filecat 6.7.0 → 6.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/2502.11767be679fbd6ea43ec.js +2 -0
- package/build/dist/2542.0bb1b9d7512a8d6dbafc.js +2 -0
- package/build/dist/27.9e60a657618569eddc88.js +2 -0
- package/build/dist/2851.c6de31a301ab5a7069b3.js +2 -0
- package/build/dist/4273.1b1f2c82ce8bdac85b36.js +2 -0
- package/build/dist/4377.69ec4d09ec5f149083bc.js +2 -0
- package/build/dist/{4943.370f70fb82a3463ca5cf.js → 4943.2ac88f6dc80e349e9f8f.js} +2 -2
- package/build/dist/5937.4edccfc675775283525a.js +2 -0
- package/build/dist/6247.10552fe1e4a60a12cd8a.js +2 -0
- package/build/dist/9591.407a2b9c30537745ea2f.js +2 -0
- package/build/dist/9704.199cc8c1553096c054a4.js +2 -0
- package/build/dist/index.html +1 -1
- package/build/dist/{main.e7c06f33476f174de6d3.js → main.755a99ed8910bd7c931b.js} +2 -2
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/2502.91a7c536734d9e63b25c.js +0 -2
- package/build/dist/2542.ab1d185d704f601b392e.js +0 -2
- package/build/dist/27.d90dd63030b1c40d4d30.js +0 -2
- package/build/dist/2851.269cb7a6e7b37f044d79.js +0 -2
- package/build/dist/4273.1c2cf44b3606195ce997.js +0 -2
- package/build/dist/4377.0737d33fb565dc62a5eb.js +0 -2
- package/build/dist/5937.b65d64858533352cd4dd.js +0 -2
- package/build/dist/6247.4eb2d8943429a90705a8.js +0 -2
- package/build/dist/9591.467851ec1c1612f48795.js +0 -2
- package/build/dist/9704.7abcded73a4377cdb34b.js +0 -2
- /package/build/dist/{2502.91a7c536734d9e63b25c.js.LICENSE.txt → 2502.11767be679fbd6ea43ec.js.LICENSE.txt} +0 -0
- /package/build/dist/{2542.ab1d185d704f601b392e.js.LICENSE.txt → 2542.0bb1b9d7512a8d6dbafc.js.LICENSE.txt} +0 -0
- /package/build/dist/{27.d90dd63030b1c40d4d30.js.LICENSE.txt → 27.9e60a657618569eddc88.js.LICENSE.txt} +0 -0
- /package/build/dist/{2851.269cb7a6e7b37f044d79.js.LICENSE.txt → 2851.c6de31a301ab5a7069b3.js.LICENSE.txt} +0 -0
- /package/build/dist/{4273.1c2cf44b3606195ce997.js.LICENSE.txt → 4273.1b1f2c82ce8bdac85b36.js.LICENSE.txt} +0 -0
- /package/build/dist/{4377.0737d33fb565dc62a5eb.js.LICENSE.txt → 4377.69ec4d09ec5f149083bc.js.LICENSE.txt} +0 -0
- /package/build/dist/{4943.370f70fb82a3463ca5cf.js.LICENSE.txt → 4943.2ac88f6dc80e349e9f8f.js.LICENSE.txt} +0 -0
- /package/build/dist/{5937.b65d64858533352cd4dd.js.LICENSE.txt → 5937.4edccfc675775283525a.js.LICENSE.txt} +0 -0
- /package/build/dist/{6247.4eb2d8943429a90705a8.js.LICENSE.txt → 6247.10552fe1e4a60a12cd8a.js.LICENSE.txt} +0 -0
- /package/build/dist/{9591.467851ec1c1612f48795.js.LICENSE.txt → 9591.407a2b9c30537745ea2f.js.LICENSE.txt} +0 -0
- /package/build/dist/{9704.7abcded73a4377cdb34b.js.LICENSE.txt → 9704.199cc8c1553096c054a4.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.e7c06f33476f174de6d3.js.LICENSE.txt → main.755a99ed8910bd7c931b.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 6247.4eb2d8943429a90705a8.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4627,6247],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},447(t,e,n){"use strict";n.d(e,{WA:()=>m,ZI:()=>p,Zp:()=>d,fq:()=>b,gz:()=>v,uF:()=>f,xP:()=>h});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var s=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(s||{});function c(t,e){var n=e===s.common?"card-content":e===s.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function d(t){return c(t,s.common)}function f(t){return c(t,s.full)}function h(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var b=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>g,Sm:()=>p,U6:()=>y,cA:()=>v,l6:()=>b});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,r.useRef)(null),n=d(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement(l.In,{icon:t.icon}),r.createElement("input",{type:"text",ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function m(t){var e=(0,r.useRef)(null),n=d(r.useState(""),2),i=n[0],a=n[1],l=d(r.useState("input input--block awesomplete"),2),u=l[0],s=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&s("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var f=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){f.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===c(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),f.current&&f.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:u,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function p(t){return m(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return m({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function b(t){var e,n,i=d((0,r.useState)(!1),2),o=i[0],l=i[1],u=d((0,r.useState)({}),2),s=u[0],c=u[1],f=(0,r.useRef)(null),h=(0,r.useRef)(null),m=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){f.current&&!f.current.contains(t.target)&&h.current&&!h.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(o&&f.current&&h.current){var t,e=f.current.getBoundingClientRect(),n=h.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,c({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:f,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||l(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==m?void 0:m.color)||"inherit"}},null!==(e=null!==(n=null==m?void 0:m.title)&&void 0!==n?n:null==m?void 0:m.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:h,className:"select_dropdown",style:s},t.options.map(function(e,n){var i,o,a;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),l(!1)}},null!==(o=null!==(a=e.title)&&void 0!==a?a:e.label)&&void 0!==o?o:e.value)})),document.body)))}function y(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function g(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},7481(t,e,n){"use strict";n.d(e,{S:()=>l,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,i){var o;return r.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:i,className:i===e.length-1?"small":""},n)}))})))}function l(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},6247(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>I});var r=n(6540),i=n(5725),o=n(447),a=n(5997),l=n(7481),u=n(3033),s=n(2389),c=n(4284),d=n(3459),f=n(2042),h=n(7361),m=n(505),p=n(7952),v=n(7767),b=n(7444),y=n(6417),g=n(1469),E=n(1499);function w(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return x(s,"_invoke",function(n,r,i){var o,l,u,s=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,f.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!d&&s&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,m=o[2];n>3?(i=m===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,m),l=c,u=m;(e=l<2?t:u)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,u)):f.n=u:f.v=u);try{if(s=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,l=1,u=e}finally{s=1}}return{value:e,done:d}}}(n,i,o),!0),s}var a={};function l(){}function u(){}function s(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),d=s.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,x(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=s,x(d,"constructor",s),x(s,"constructor",u),u.displayName="GeneratorFunction",x(s,i,"GeneratorFunction"),x(d),x(d,i,"Generator"),x(d,r,function(){return this}),x(d,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:f}})()}function x(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}x=function(t,e,n,r){function o(e,n){x(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},x(t,e,n,r)}function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function A(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function C(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,l,"next",t)}function l(t){A(o,r,i,a,l,"throw",t)}a(void 0)})}}function S(t){return function(t){if(Array.isArray(t))return N(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return N(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(t,e):void 0}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function I(){var t=(0,s.Bd)(),e=t.t,n=(t.i18n,(0,v.Zp)()),x=[e("编号"),e("路径"),e("过期小时"),e("token"),e("备注"),e("剩余时间(h)"),e("下载次数")],A=k((0,r.useState)([]),2),O=A[0],N=A[1],I=k((0,b.L4)(y.AG.prompt_card),2),j=(I[0],I[1]),T=function(){var t=C(w().m(function t(){var e,n,r,i,o,a,l,u,s;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c.XO.get("get_share_file_list");case 1:if((e=t.v).code===d.m.Success){r=null!==(n=e.data)&&void 0!==n?n:[],i=Date.now(),o=_(r);try{for(o.s();!(a=o.n()).done;){l=a.value;try{null!=l.left_hour&&l.left_hour>0?(u=i-l.time_stamp,s=36e5*l.left_hour-u,l.show_left_hour=parseFloat((s/36e5).toFixed(2))):l.show_left_hour=l.left_hour}catch(t){}}}catch(t){o.e(t)}finally{o.f()}N(r)}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){T()},[]);var P=function(){var t=C(w().m(function t(){return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c.XO.post("set_share_file_list",O);case 1:t.v.code===d.m.Success&&((0,f.LW)("保存成功"),T());case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{className:"common-box "},r.createElement(p.A,null,r.createElement(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:function(){n(-1)}})),r.createElement(i.J,{widthPer:100},r.createElement(o.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("文件分享列表")),r.createElement(a.rA,{icon:"info",title:e("提示"),onClick:function(){var t=r.createElement("div",null,"小时设置为-1或者不设置就没有过期时间");j({open:!0,title:"信息",context_div:r.createElement("div",null,t)})}})),titleCom:r.createElement("div",null,r.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){N([].concat(S(O),[{note:"",path:""}]))}}),r.createElement(a.rA,{icon:"save",title:e("保存"),onClick:P}))},r.createElement(l.X,{headers:x,rows:O.map(function(t,n){var i=[r.createElement("div",null,n),r.createElement(u.Sm,{value:t.path,handleInputChange:function(e){t.path=e},no_border:!0}),r.createElement(u.Sm,{value:t.left_hour,handleInputChange:function(e){t.left_hour=parseFloat(e),t.time_stamp=Date.now()},no_border:!0}),r.createElement(u.Sm,{value:t.token,handleInputChange:function(e){t.token=e},no_border:!0}),r.createElement(u.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("p",null,t.show_left_hour),r.createElement("p",null,t.download_num),r.createElement("div",null,r.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){O.splice(t,1),N(S(O))}(n)}}),t.id&&r.createElement(a.rA,{icon:"content_copy",title:e("复制地址"),onClick:function(){var e=(0,E.bi)("".concat(window.location.origin).concat(g.m.base_url),"".concat(h.o.share,"/").concat(t.id));(0,m.lW)(e),(0,f.LW)(e)}}))];return i}),width:"10rem"}))))}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),u=n.n(l),s=n(5056),c=n.n(s),d=n(540),f=n.n(d),h=n(1113),m=n.n(h),p=n(1028),v={};v.styleTagTransform=m(),v.setAttributes=c(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();i()(p.A,v),p.A&&p.A.locals&&p.A.locals}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 9591.467851ec1c1612f48795.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9591],{9591(e,t,n){n.r(t),n.d(t,{default:()=>D});var r=n(2389),o=n(6540),a=n(5997),i=n(7952),c=n(7444),l=n(6417),u=n(5725),s=n(7481),m=n(3033),f=n(447),d=n(4299);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var h=n(4284),_=n(3459),E=n(2042),y=n(7523),g=n(8247),b=n(3430),w=n(7767),C=n(4944),S=n(4188),k=n(8815),A=n(5907),O=n(2721),j=n(4659),x=n(3277),P=n(6494);function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach(function(t){L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=I(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==I(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof c?r:c,u=Object.create(l.prototype);return T(u,"_invoke",function(n,r,o){var a,c,l,u=0,s=o||[],m=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,c=0,l=e,f.n=n,i}};function d(n,r){for(c=n,l=r,t=0;!m&&u&&!o&&t<s.length;t++){var o,a=s[t],d=f.p,p=a[2];n>3?(o=p===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(c=0,f.v=r,f.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,f.n=p,c=0))}if(o||n>1)return i;throw m=!0,r}return function(o,s,p){if(u>1)throw TypeError("Generator is already running");for(m&&1===s&&d(s,p),c=s,l=p;(t=c<2?e:l)||!m;){a||(c?c<3?(c>1&&(f.n=-1),d(c,l)):f.n=l:f.v=l);try{if(u=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(m=f.n<0)?l:n.call(r,f))!==i)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:m}}}(n,o,a),!0),u}var i={};function c(){}function l(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(T(t={},r,function(){return this}),t),m=u.prototype=c.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,T(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return l.prototype=u,T(m,"constructor",u),T(u,"constructor",l),l.displayName="GeneratorFunction",T(u,o,"GeneratorFunction"),T(m),T(m,o,"Generator"),T(m,r,function(){return this}),T(m,"toString",function(){return"[object Generator]"}),(M=function(){return{w:a,m:f}})()}function T(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}T=function(e,t,n,r){function a(t,n){T(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},T(e,t,n,r)}function F(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function G(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){F(a,r,o,i,c,"next",e)}function c(e){F(a,r,o,i,c,"throw",e)}i(void 0)})}}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||W(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){if(e){if("string"==typeof e)return Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function D(){var e=(0,r.Bd)().t,t=(0,o.useContext)(y.F).initUserInfo,n=[e("编号"),e("url"),e("model类型"),e("是否开启"),e("token"),"model",e("成为tool"),e("更多属性"),e("备注")],v=(0,P.r)(),I=[e("编号"),e("本地目录"),e("自动加载"),e("备注")],N=V((0,o.useState)([]),2),L=N[0],T=N[1],F=V((0,o.useState)([]),2),W=F[0],Y=F[1],D=V((0,o.useState)([]),2),H=D[0],R=D[1],U=V((0,o.useState)(null),2),q=U[0],z=U[1],Z=(0,o.useRef)(),$=(0,o.useRef)(!1),B=(0,o.useRef)(!1),J=V((0,o.useState)([]),2),Q=J[0],ee=J[1],te=V((0,o.useState)(!1),2),ne=(te[0],te[1]),re=V((0,c.L4)(l.AG.prompt_card),2),oe=(re[0],re[1]),ae=V((0,c.L4)(l.AG.user_base_info),2),ie=(ae[0],ae[1],V((0,o.useState)(!1),2)),ce=ie[0],le=ie[1],ue=H.filter(function(e){var t;return"http"!==(null!==(t=e.transport)&&void 0!==t?t:"stdio")}),se=H.filter(function(e){return"http"===e.transport}),me=[e("编号"),e("名称"),e("是否开启"),"command","args","cwd",e("tools|env"),e("备注")],fe=[e("编号"),e("名称"),e("是否开启"),e("endpoint"),e("tools|headers"),e("备注")],de=[e("编号"),e("提示词"),e("备注"),e("操作")],pe=V((0,o.useState)([]),2),ve=pe[0],he=pe[1],_e=function(){var e=p((0,c.L4)(l.AG.prompt_card),2),t=(e[0],e[1]);return function(e){t({open:!0,title:"信息",context_div:o.createElement("div",null,o.createElement(d.default,{context:e}))})}}(),Ee=(0,g.MH)().check_user_auth,ye=V((0,c.L4)(l.AG.editorSetting),2),ge=(ye[0],ye[1]),be=(0,w.Zp)(),we=(0,A.y)(),Ce=(0,j.K)(),Se=function(){var e=G(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.jV.get("docs_on_get");case 1:(t=e.v).code===_.m.Success&&le(t.data);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=G(M().m(function e(){var t,n,r,o,a,i,c,l;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.XO.get("ai_agent_setting");case 1:return(t=e.v).code===_.m.Success&&T(t.data.models),e.n=2,C.ws.addMsg(S.HK.ai_load_info,function(e){z(e.context)});case 2:return e.n=3,C.ws.sendData(S.HK.ai_load_info,{});case 3:return null!=(n=e.v)&&n.context&&z(n.context),e.n=4,h.XO.get("ai_docs_setting");case 4:return(r=e.v).code===_.m.Success&&(Z.current=r.data.param,null!==(o=r.data.list)&&void 0!==o&&o.length&&Y(r.data.list)),e.n=5,h.XO.get("ai_mcp_setting");case 5:return(a=e.v).code===_.m.Success&&R(null!==(i=a.data.list)&&void 0!==i?i:[]),e.n=6,Ie();case 6:return Se(),e.n=7,h.XO.get("ai_system_prompts");case 7:(c=e.v).code===_.m.Success&&he(null!==(l=c.data)&&void 0!==l?l:[]);case 8:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,o.useEffect)(function(){ke()},[]);var Ae=function(){var e="http"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"stdio")?{name:"",open:!1,note:"",transport:"http",endpoint:"",headers:"",stream:!1,timeout_ms:1e4}:{name:"",open:!1,command:"",args:"",cwd:"",env:"",note:"",transport:"stdio",timeout_ms:1e4};R([].concat(X(H),[e])),$.current=!0},Oe=function(e){var t=H.indexOf(e);t<0||(H.splice(t,1),R(X(H)),$.current=!0)},je=function(e){R([].concat(X(H),[K(K({},e),{},{open:!1})])),$.current=!0},xe=function(){var e=G(M().m(function e(t){var n;return M().w(function(e){for(;;)switch(e.n){case 0:for(n=0;n<L.length;n++)L[n].index=n;return e.n=1,h.XO.post("ai_agent_setting/save",{models:null!=t?t:L});case 1:e.v.code===_.m.Success&&(0,E.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Pe=function(){var e=G(M().m(function e(t){var n;return M().w(function(e){for(;;)switch(e.n){case 0:for(n=0;n<H.length;n++)H[n].index=n;return e.n=1,h.XO.post("ai_mcp_setting/save",{list:null!=t?t:H});case 1:if(e.v.code!==_.m.Success){e.n=2;break}return(0,E.LW)("保存成功"),$.current=!1,e.n=2,Ie();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Ie=function(){var e=G(M().m(function e(){var t,n,r;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.XO.get("ai_mcp_tools");case 1:if((t=e.v).code!==_.m.Success){e.n=2;break}return ee(null!==(n=t.data)&&void 0!==n?n:[]),e.a(2,null!==(r=t.data)&&void 0!==r?r:[]);case 2:return e.a(2,[])}},e)}));return function(){return e.apply(this,arguments)}}(),Ne=function(){var e=G(M().m(function e(t){var n,r;return M().w(function(e){for(;;)switch(e.p=e.n){case 0:return ne(!0),e.p=1,e.n=2,h.XO.post("ai_mcp_tools/reload",{index:t});case 2:if((n=e.v).code!==_.m.Success){e.n=4;break}return e.n=3,Ie();case 3:return(0,E.LW)("MCP工具加载成功"),e.a(2,null!==(r=n.data)&&void 0!==r?r:null);case 4:return e.p=4,ne(!1),e.f(4);case 5:return e.a(2,null)}},e,null,[[1,,4,5]])}));return function(t){return e.apply(this,arguments)}}(),Ke=function(){var t=G(M().m(function t(n,r,a,i){var c,l,u,s,m,f,d;return M().w(function(t){for(;;)switch(t.n){case 0:f=null!==(c=null!=i?i:Q.find(function(e){return e.index===r}))&&void 0!==c?c:{index:r,key:"".concat(r),name:null!==(l=n.name)&&void 0!==l?l:"",note:n.note,transport:null!==(u=n.transport)&&void 0!==u?u:"stdio",open:!!n.open,loaded:!1,tool_count:0,tools:[]},d=(null!==(s=f.tools)&&void 0!==s?s:[]).map(function(t){return{id:t.runtime_name,title:t.tool_name,subtitle:t.description||e("无描述"),detail:t.display_name,meta:t.runtime_name}}),oe({open:!0,title:"".concat(n.name||n.note||r," MCP工具"),context_div:o.createElement(O.O,{title:"".concat(n.name||n.note||r," MCP工具"),subtitle:"".concat(null!==(m=f.transport)&&void 0!==m?m:"stdio"," | ").concat(f.open?e("是"):e("否")," | ").concat(f.loaded?"loaded":"idle"," | ").concat(f.tool_count," tools"),pages:d,initialPageId:a,onRefresh:G(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Ne(r);case 1:if(!(t=e.v)){e.n=2;break}return e.n=2,Ke(n,r,a,t);case 2:return e.a(2)}},e)})),renderPage:function(t){var n,r;if(!t)return o.createElement("div",{className:"prompt-switch-page__empty"},e("暂无工具"));var a=null===(n=f.tools)||void 0===n?void 0:n.find(function(e){return e.runtime_name===t.id});return a?o.createElement("div",{className:"prompt-switch-page__detail"},o.createElement("div",{className:"prompt-switch-page__detail-title"},a.display_name),o.createElement("div",{className:"prompt-switch-page__detail-desc"},a.description||e("无描述")),o.createElement("div",{className:"prompt-switch-page__detail-row"},o.createElement("strong",null,"runtime:")," ",a.runtime_name),o.createElement("div",null,o.createElement("strong",null,"schema:"),o.createElement("pre",{className:"prompt-switch-page__schema"},JSON.stringify(null!==(r=a.input_schema)&&void 0!==r?r:{},null,2)))):o.createElement("div",{className:"prompt-switch-page__empty"},e("暂无工具"))}}),cancel:function(){return oe({open:!1})}});case 1:return t.a(2)}},t)}));return function(e,n,r,o){return t.apply(this,arguments)}}(),Le=function(){var e=G(M().m(function e(t){var n,r;return M().w(function(e){for(;;)switch(e.n){case 0:for(n=0;n<L.length;n++)L[n].index=n;return r={list:W,docs_update_tag:B.current},null!=t&&(r={param:t}),B.current=!1,e.n=1,h.XO.post("ai_docs_setting_save",r);case 1:e.v.code===_.m.Success&&(0,E.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Xe=function(){var e=G(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:for(t=0;t<ve.length;t++)ve[t].index=t;return e.n=1,h.XO.post("ai_system_prompts/save",{list:ve});case 1:e.v.code===_.m.Success&&(0,E.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return o.createElement("div",null,o.createElement(i.A,null,Ee(b.oV.ai_agent_setting)&&o.createElement(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:function(){be(-1)}})),o.createElement(u.jW,{isFull:!0,more:!0},o.createElement(u.NN,null,o.createElement(u.xh,null,o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:100},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("Model")+" "+e("设置"))," ",o.createElement(a.rA,{icon:"info",onClick:function(){_e('\n1. 只能使用符合openai风格的ai接口,接口不能只填域名,而是类似 https://ark.cn-beijing.volces.com/api/v3/chat/completions 这样的全路径链接聊天url\n2. 对话的历史越长,消耗的大模型token费用越贵,目前不具备长期记忆简化能力,可以在系统prompt中设置一下让AI回答的简洁一点,节省tokens\n3. model请求参数json编写,里面只能编写json,来用于编写openai风格ai支持的属性,比如 temperature thinking(豆包的深度思考开关)等\n4. 可以在model请求参数中开启 "stream":true 提高响应速度\n5. 深度思考现在会影响输出速度,建议设置`{\n "thinking" : { \n "type":"disabled"\n }\n}`关闭(豆包例子)\n6. 使用AI功能来查询服务器信息,那么AI就需要能够之一些命令,需要先在用户设置中,给用户设置命令权限,建议设置 `*` 允许全部命令,在设置禁止不能执行的危险命令。\n7. 成为tool 后,该模型将会作为一个工具被加载,可以实现不同模型作为不能角色的能力。\n8. model 类型是必须要设置的,因为不同类型的 model 接口格式不同。\n')},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){T([].concat(X(L),[{note:"",open:!1,path:"",dotenv:x.CP,json_params:x.cL}]))}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){xe()}}))},o.createElement(s.X,{headers:n,rows:L.map(function(t,n){var r,i,c,l,u,s,f,d=[o.createElement("div",null,n),o.createElement(m.Sm,{value:x.Lv.get_label_by_v(t.url,null===(r=t.show_options)||void 0===r?void 0:r.options_agent_url_list),options:null===(i=t.show_options)||void 0===i?void 0:i.options_agent_url_list,handleInputChange:function(e){t.url=e},no_border:!0}),o.createElement(m.l6,{value:null!==(c=t.request_type)&&void 0!==c?c:"completions",onChange:function(e){t.request_type=e,T(X(L))},options:v,no_border:!0}),o.createElement(m.l6,{value:t.open,onChange:function(e){!function(e,t,n){for(var r=[],o=0;o<L.length;o++)L[o].open=o===n&&t,r.push(L[o]);T(r)}(0,e,n)},options:Ce,no_border:!0}),o.createElement(m.Sm,{value:x.Lv.get_label_by_v(t.token,null===(l=t.show_options)||void 0===l?void 0:l.options_agent_token_list),options:null===(u=t.show_options)||void 0===u?void 0:u.options_agent_token_list,handleInputChange:function(e){t.token=e},no_border:!0}),o.createElement(m.Sm,{value:x.Lv.get_label_by_v(t.model,null===(s=t.show_options)||void 0===s?void 0:s.options_agent_model_list),options:null===(f=t.show_options)||void 0===f?void 0:f.options_agent_model_list,handleInputChange:function(e){t.model=e},no_border:!0}),o.createElement(m.l6,{value:t.tool_mode,onChange:function(n){t.open&&!0===n?(0,E.zN)(e("开启状态不能成为tool")):(t.tool_mode=n,T(X(L)))},options:Ce,no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"short_text",title:"prompt",onClick:function(){var e,t;g.xK.set_value_temp(null!==(e=L[n].sys_prompt)&&void 0!==e?e:""),ge({model:"ace/mode/text",open:!0,fileName:"",save:(t=G(M().m(function e(t){return M().w(function(e){for(;;)switch(e.n){case 0:L[n].sys_prompt=t,T(L),g.xK.set_value_temp(""),xe(L);case 1:return e.a(2)}},e)})),function(e){return t.apply(this,arguments)})})}}),o.createElement(a.rA,{icon:"edit_attributes",title:"model请求参数json编写",onClick:function(){var e;g.xK.set_value_temp(L[n].json_params),ge({model:"ace/mode/json",open:!0,fileName:"",save:(e=G(M().m(function e(t){return M().w(function(e){for(;;)switch(e.n){case 0:L[n].json_params=t,T(L),g.xK.set_value_temp(""),xe(L);case 1:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)}),can_format:!0})}}),o.createElement(a.rA,{icon:"settings",title:"额外参数设置",onClick:function(){var e;g.xK.set_value_temp(L[n].dotenv),ge({model:"ace/mode/ini",open:!0,fileName:"",save:(e=G(M().m(function e(t){return M().w(function(e){for(;;)switch(e.n){case 0:L[n].dotenv=t,T(L),g.xK.set_value_temp(""),xe(L);case 1:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){L.splice(e,1),T(X(L))}(n)}}),o.createElement(a.rA,{icon:"copy_all",title:e("复制"),onClick:function(){return function(e){T([].concat(X(L),[K(K({},L[e]),{},{open:!1})]))}(n)}}))];return d}),width:"10rem"})))),o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:70},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("MCP")+" "+e("设置")," - stdio")," ",o.createElement(a.rA,{icon:"info",onClick:function(){_e("\n1. 这里配置的是 MCP Client 启动参数,当前实现的是 stdio 模式,也就是通过 command + args 启动本地 MCP Server\n2. 例如可以填 npx / uvx / python 等命令,再配合对应的 MCP server 包参数\n3. 保存后会自动重新加载 MCP 工具,agent 聊天时会把这些工具一起带给模型\n4. 建议把 cwd 配到具体项目目录,避免 server 在错误目录里运行\n")},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){return Ae("stdio")}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Pe()}}))},o.createElement(s.X,{headers:me,rows:ue.map(function(t,n){var r=H.indexOf(t),i=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.name,handleInputChange:function(e){t.name=e,$.current=!0},no_border:!0}),o.createElement(m.l6,{value:t.open,onChange:function(e){t.open=e,R(X(H)),$.current=!0},options:Ce,no_border:!0}),o.createElement(m.Sm,{value:t.command,handleInputChange:function(e){t.command=e,$.current=!0},no_border:!0}),o.createElement(m.Sm,{value:t.args,handleInputChange:function(e){t.args=e,$.current=!0},no_border:!0}),o.createElement(m.Sm,{value:t.cwd,handleInputChange:function(e){t.cwd=e,$.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"visibility",title:"查看工具",onClick:function(){Ke(t,r)}}),o.createElement(a.rA,{icon:"settings",title:"env",onClick:function(){var e,n;g.xK.set_value_temp(null!==(e=t.env)&&void 0!==e?e:""),ge({model:"ace/mode/ini",open:!0,fileName:"",save:(n=G(M().m(function e(n){return M().w(function(e){for(;;)switch(e.n){case 0:t.env=n,R(X(H)),g.xK.set_value_temp(""),$.current=!0,Pe();case 1:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e,$.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return Oe(t)}}),o.createElement(a.rA,{icon:"copy_all",title:e("复制"),onClick:function(){return je(t)}}))];return i}),width:"10rem"})))),o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:70},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("MCP")+" "+e("设置")," - HTTP")," "),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){return Ae("http")}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Pe()}}))},o.createElement(s.X,{headers:fe,rows:se.map(function(t,n){var r=H.indexOf(t),i=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.name,handleInputChange:function(e){t.name=e,$.current=!0},no_border:!0}),o.createElement(m.l6,{value:t.open,onChange:function(e){t.open=e,R(X(H)),$.current=!0},options:Ce,no_border:!0}),o.createElement(m.Sm,{value:t.endpoint,handleInputChange:function(e){t.endpoint=e,$.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"visibility",title:"查看工具",onClick:function(){Ke(t,r)}}),o.createElement(a.rA,{icon:"settings",title:"headers",onClick:function(){var e,n;g.xK.set_value_temp(null!==(e=t.headers)&&void 0!==e?e:""),ge({model:"ace/mode/ini",open:!0,fileName:"",save:(n=G(M().m(function e(n){return M().w(function(e){for(;;)switch(e.n){case 0:t.headers=n,R(X(H)),g.xK.set_value_temp(""),$.current=!0,Pe();case 1:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e,$.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return Oe(t)}}),o.createElement(a.rA,{icon:"copy_all",title:e("复制"),onClick:function(){return je(t)}}))];return i}),width:"10rem"})),o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("系统会话提示词"))," ",o.createElement(a.rA,{icon:"info",onClick:function(){_e('\n1. 系统会话提示词,在 AI 聊天页创建会话时可以选择,选中的提示词会自动填入聊天框作为第一条系统消息\n2. 适用于预先设定常用的会话场景模板,如"代码审查"、"翻译助手"、"运维诊断"等\n')},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){he([].concat(X(ve),[{prompt:"",note:""}]))}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Xe()}}))},o.createElement(s.X,{headers:de,rows:ve.map(function(t,n){var r=[o.createElement("div",null,n),o.createElement("div",null,o.createElement(a.rA,{icon:"short_text",title:e("提示词"),onClick:function(){var e,n;g.xK.set_value_temp(null!==(e=t.prompt)&&void 0!==e?e:""),ge({model:"ace/mode/text",open:!0,fileName:"",save:(n=G(M().m(function e(n){return M().w(function(e){for(;;)switch(e.n){case 0:t.prompt=n,he(X(ve)),g.xK.set_value_temp(""),Xe();case 1:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){ve.splice(e,1),he(X(ve))}(n)}}))];return r}),width:"10rem"})))),o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:50},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("本地知识库"))," ",o.createElement(a.rA,{icon:"info",onClick:function(){_e("\n1. 本地知识库用于为AI增强理解能力,或者分析本地文件,原理读取本地的文件,对文件在内存中建立全文索引,为AI提供额外数据(需要有模型开启才能使用)\n2. 该功能只能用于小型知识库,作为本地小型或者公司内部资料使用还是没有问题的\n3. 每次保存都会重新加载知识库中的文件,不会全部重新加载,而是检测哪些文件有变更\n")},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.Ay,{checked:ce,onChange:function(){var e=G(M().m(function e(n){return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.jV.post("docs_on_set",{status:n});case 1:Se(),t();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),title:e("知识库开关")}),o.createElement(a.rA,{icon:"settings",title:"额外参数设置",onClick:function(){var e;g.xK.set_value_temp(Z.current),ge({model:"ace/mode/ini",open:!0,fileName:"",save:(e=G(M().m(function e(t){return M().w(function(e){for(;;)switch(e.n){case 0:Z.current=t,g.xK.set_value_temp(""),Le(Z.current);case 1:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)})})}}),o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){Y([].concat(X(W),[{note:"",auto_load:!1,dir:""}])),B.current=!0}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Le()}}))},o.createElement(s.X,{headers:I,rows:W.map(function(t,n){var r=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.dir,handleInputChange:function(e){t.dir=e,B.current=!0},no_border:!0}),o.createElement(m.l6,{value:t.auto_load,onChange:function(e){t.auto_load=e,Y(X(W)),B.current=!0},options:Ce,no_border:!0}),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除记录"),onClick:function(){return function(e){W.splice(e,1),Y(X(W)),B.current=!0}(n)}}),o.createElement(a.rA,{icon:"restore",title:e("手动加载"),onClick:function(){we({sub_title:"手动加载",confirm_fun:function(){h.jV.post("ai_load_one_file",{param_path:t.dir}),(0,E.LW)("ok")}})}}),o.createElement(a.rA,{icon:"delete_forever",title:e("从索引删除"),onClick:function(){we({sub_title:"从索引删除",confirm_fun:function(){h.jV.post("ai_del",{param_path:t.dir}),(0,E.LW)("ok")}})}}))];return r}),width:"10rem"}))),q&&o.createElement(u.VP,{widthPer:50},o.createElement(f.Zp,{title:e("知识库加载信息")},o.createElement(u.Yh,{left:e("最近一次加载")+","+e("加载进度"),right:null==q?void 0:q.progress}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总文件数量")),right:null==q?void 0:q.num}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总文件字符数量")),right:null==q?void 0:q.char_num}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总文件大小")),right:(0,k.v7)(null==q?void 0:q.size)}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总耗时")),right:(0,k.a3)(null==q?void 0:q.consume_time_ms_len)}),o.createElement(u.Yh,{left:"".concat(e("总文件数量")),right:null==q?void 0:q.total_num}))))))))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 9704.7abcded73a4377cdb34b.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4627,9704],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=u(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function u(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=u(t,e);return null===n?null:t[n]}function s(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function d(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function h(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function y(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>h,I:()=>y,IO:()=>d,Lr:()=>v,P1:()=>f,a7:()=>s,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>y,gz:()=>v,uF:()=>d,xP:()=>h});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function s(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return s(t,c.common)}function d(t){return s(t,c.full)}function h(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var y=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>g,Sm:()=>m,U6:()=>b,cA:()=>v,l6:()=>y});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement(l.In,{icon:t.icon}),r.createElement("input",{type:"text",ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],a=n[1],l=f(r.useState("input input--block awesomplete"),2),u=l[0],c=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&c("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var d=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){d.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===s(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),d.current&&d.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:u,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function m(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function y(t){var e,n,i=f((0,r.useState)(!1),2),o=i[0],l=i[1],u=f((0,r.useState)({}),2),c=u[0],s=u[1],d=(0,r.useRef)(null),h=(0,r.useRef)(null),p=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){d.current&&!d.current.contains(t.target)&&h.current&&!h.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(o&&d.current&&h.current){var t,e=d.current.getBoundingClientRect(),n=h.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,s({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:d,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||l(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==p?void 0:p.color)||"inherit"}},null!==(e=null!==(n=null==p?void 0:p.title)&&void 0!==n?n:null==p?void 0:p.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:h,className:"select_dropdown",style:c},t.options.map(function(e,n){var i,o,a;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),l(!1)}},null!==(o=null!==(a=e.title)&&void 0!==a?a:e.label)&&void 0!==o?o:e.value)})),document.body)))}function b(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function g(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},7481(t,e,n){"use strict";n.d(e,{S:()=>l,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,i){var o;return r.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:i,className:i===e.length-1?"small":""},n)}))})))}function l(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},7209(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>U});var r=n(6540),i=n(5725),o=n(3033),a=n(447),l=n(5997),u=n(4289),c=n(2389),s=n(2042),f=n(4284),d=n(3459);function h(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return p(c,"_invoke",function(n,r,i){var o,l,u,c=0,s=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,d.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!f&&c&&!i&&e<s.length;e++){var i,o=s[e],h=d.p,p=o[2];n>3?(i=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,p),l=s,u=p;(e=l<2?t:u)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,u)):d.n=u:d.v=u);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){o=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(p(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,p(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,p(f,"constructor",c),p(c,"constructor",u),u.displayName="GeneratorFunction",p(c,i,"GeneratorFunction"),p(f),p(f,i,"Generator"),p(f,r,function(){return this}),p(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:d}})()}function p(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}p=function(t,e,n,r){function o(e,n){p(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},p(t,e,n,r)}function m(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function b(t){var e=(0,c.Bd)().t,n=v((0,r.useState)(e("毫秒")),2),p=n[0],y=n[1],b=v((0,r.useState)(""),2),g=b[0],E=b[1],w=v((0,r.useState)(""),2),x=w[0],_=w[1],A=v((0,r.useState)(null),2),S=A[0],C=A[1],O=v((0,r.useState)(null),2),k=O[0],j=O[1],N=v((0,r.useState)(Date.now()),2),I=N[0],T=N[1];var P=function(){var t,e=(t=h().m(function t(){var e,n;return h().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f.Yu.get("sys_time/get");case 1:if((e=t.v).code!==d.m.Success){t.n=3;break}return t.n=2,e.data;case 2:n=t.v,C(n.timestamp),j(n.timezone),T(n.timestamp);case 3:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){m(o,r,i,a,l,"next",t)}function l(t){m(o,r,i,a,l,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)(function(){P();var t=setInterval(function(){T(function(t){return t+1e3})},1e3);return function(){return clearInterval(t)}},[]),r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(a.Zp,{title:e("时间转换器"),rightBottomCom:r.createElement(l.C3,{text:e("确定"),clickFun:function(){if(g||x){var t=0,e=""!==g&&0!==g;if(e){if(!(0,u.kf)(g))return void(0,s.zN)("must be number !");t=parseInt(g),"分秒"===p&&(t*=1e3)}var n=new Date(e?t:x),r=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n);if(_(r),!g){var i=n.getTime();E("毫秒"===p?i:i/1e3)}}else new Noty({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},r.createElement(o.l6,{options:[{title:e("毫秒"),value:"毫秒"},{title:e("分秒"),value:"分秒"}],onChange:function(t){y(t)}}),r.createElement(o.Sm,{placeholder:p,value:g,handleInputChange:function(t){E(t)}}),r.createElement(o.Sm,{placeholder:e("格式化时间"),value:x,handleInputChange:function(t){_(t)}}))),r.createElement(i.VP,null,null!==S&&null!==k&&r.createElement(a.Zp,{title:e("服务器时间")},r.createElement("h1",null,e("时区"),": ",k),r.createElement("h1",null,e("时间"),": ",new Date(I).toLocaleString(navigator.language,{timeZone:k})))))}var g=n(3413),E=n.n(g),w=n(7952),x=n(3029),_=n(8247),A=n(3430);function S(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return C(c,"_invoke",function(n,r,i){var o,l,u,c=0,s=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,d.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!f&&c&&!i&&e<s.length;e++){var i,o=s[e],h=d.p,p=o[2];n>3?(i=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,p),l=s,u=p;(e=l<2?t:u)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,u)):d.n=u:d.v=u);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){o=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(C(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,C(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,C(f,"constructor",c),C(c,"constructor",u),u.displayName="GeneratorFunction",C(c,i,"GeneratorFunction"),C(f),C(f,i,"Generator"),C(f,r,function(){return this}),C(f,"toString",function(){return"[object Generator]"}),(S=function(){return{w:o,m:d}})()}function C(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}C=function(t,e,n,r){function o(e,n){C(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},C(t,e,n,r)}function O(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function k(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,l,"next",t)}function l(t){O(o,r,i,a,l,"throw",t)}a(void 0)})}}function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return N(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function I(t){var e=(0,c.Bd)().t,n=(0,_.MH)().check_user_auth,i=j((0,r.useState)(""),2),a=i[0],u=i[1],s=function(){var t=k(S().m(function t(e){var n;return S().w(function(t){for(;;)switch(t.n){case 0:if(n=e||a){t.n=1;break}return new(E())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:return t.n=2,f._U.post("wol/exec",{mac:n});case 2:if(t.v.code===d.m.Success){t.n=3;break}return t.a(2);case 3:new(E())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),h=function(){var t=k(S().m(function t(){var e;return S().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f._U.get("wol/tag");case 1:if((e=t.v).code!==d.m.Success){t.n=2;break}return t.a(2,e.data);case 2:return t.a(2,[])}},t)}));return function(){return t.apply(this,arguments)}}(),p=function(){var t=k(S().m(function t(e){return S().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f._U.post("wol/tag/save",e);case 1:t.v.code!==d.m.Success&&new(E())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),m=function(){var t=k(S().m(function t(e){return S().w(function(t){for(;;)switch(t.n){case 0:u(e.mac),s(e.mac);case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(w.A,null,r.createElement(l.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){s()}}),r.createElement(o.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:a,handleInputChange:function(t){return u(t)}})),r.createElement(x.N,{have_auth_edit:n(A.oV.wol_proxy_tag_update),getItems:h,save:p,clickItem:m,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var T,P=n(7481),L=n(7444),R=n(6417),F=n(505);function G(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return M(c,"_invoke",function(n,r,i){var o,l,u,c=0,s=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,d.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!f&&c&&!i&&e<s.length;e++){var i,o=s[e],h=d.p,p=o[2];n>3?(i=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,p),l=s,u=p;(e=l<2?t:u)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,u)):d.n=u:d.v=u);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){o=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(M(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,M(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,M(f,"constructor",c),M(c,"constructor",u),u.displayName="GeneratorFunction",M(c,i,"GeneratorFunction"),M(f),M(f,i,"Generator"),M(f,r,function(){return this}),M(f,"toString",function(){return"[object Generator]"}),(G=function(){return{w:o,m:d}})()}function M(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}M=function(t,e,n,r){function o(e,n){M(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},M(t,e,n,r)}function D(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function W(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){D(o,r,i,a,l,"next",t)}function l(t){D(o,r,i,a,l,"throw",t)}a(void 0)})}}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function H(){var t=$((0,r.useState)("rsa"),2),e=t[0],n=t[1],u=$((0,r.useState)("pem"),2),h=u[0],p=u[1],m=(0,c.Bd)(),v=m.t,y=(m.i18n,$((0,L.L4)(R.AG.confirm),2)),b=(y[0],y[1]),g=$((0,r.useState)(""),2),E=g[0],x=g[1],_=$((0,r.useState)(""),2),A=_[0],S=_[1],C=function(){var t=W(G().m(function t(){var n;return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f.cD.post("generate",{type:e,form:h});case 1:(n=t.v).code===d.m.Success&&(x(n.data.public_key),S(n.data.private_key),T=n.data.home_path);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),O=function(){var t=W(G().m(function t(n){var r;return G().w(function(t){for(;;)switch(t.n){case 0:if(A&&E){t.n=1;break}return(0,s.zN)("密钥不能为空"),t.a(2);case 1:r="id_"+e,"pub"===n&&(r+=".pub"),b({open:!0,title:v("将覆盖密钥文件"),sub_title:"之前的密钥将作废。 将会作为 ".concat(r,' 文件保存到系统上的"').concat(T,'"目录下,此目录会作为openssh(git)所使用的默认目录。'),handle:function(){var t=W(G().m(function t(){return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f.cD.post("save_openssh",{name:r,context:"pub"===n?E:A});case 1:t.v.code===d.m.Success&&((0,s.LW)("完成"),b({open:!1,handle:null}));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement(r.Fragment,null,r.createElement(w.A,null,r.createElement(P.S,{isFlex:!0,columns:[r.createElement(o.l6,{tip:v("加密算法"),value:e,width:"auto",onChange:function(t){n(t)},options:[{title:v("RSA"),value:"rsa"},{title:v("DSA"),value:"dsa"},{title:v("ECDSA"),value:"ecdsa"}]}),r.createElement(o.l6,{tip:v("输出格式"),value:h,width:"auto",onChange:function(t){p(t)},options:[{title:v("普通PEM"),value:"pem"},{title:v("opensshPEM"),value:"openssh_pem"}]}),r.createElement(l.rA,{icon:"play_arrow",title:v("生成"),onClick:function(){C()}})]})),r.createElement(i.xh,null,r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(a.Zp,{title:v("公钥"),titleCom:r.createElement(l.rA,{title:v("复制"),icon:"copy_all",onClick:function(){E&&((0,F.lW)(E),(0,s.LW)("完成"))}}),rightBottomCom:"openssh_pem"===h&&r.createElement(l.C3,{text:v("保存到.ssh目录"),clickFun:function(){O("pub")}})},r.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){x(t.target.value)},value:E}))),r.createElement(i.VP,null,r.createElement(a.Zp,{title:v("私钥"),titleCom:r.createElement(l.rA,{title:v("复制"),icon:"copy_all",onClick:function(){A&&((0,F.lW)(A),(0,s.LW)("成功"))}}),rightBottomCom:"openssh_pem"===h&&r.createElement(l.C3,{text:v("保存到.ssh目录"),clickFun:function(){O("pri")}})},r.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:A,onChange:function(t){S(t.target.value)}}))))))}function U(t){var e=(0,c.Bd)().t,n=(0,_.MH)().check_user_auth,o=[];return o.push.apply(o,[{index:1,name:e("时间工具"),rto:"timeutil/",component:r.createElement(b,null)},{index:1,name:e("非对称密钥"),rto:"crypto/",component:r.createElement(H,null)}]),n(A.oV.wol_proxy)&&o.push({index:1,name:e("网络唤醒"),rto:"netwol/",component:r.createElement(I,null)}),r.createElement(i.W1,{optionList:o})}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),u=n.n(l),c=n(5056),s=n.n(c),f=n(540),d=n.n(f),h=n(1113),p=n.n(h),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=s(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|