From 4ded7987e2e30d54f577bfda3ea4f7a7782187d2 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 11 Dec 2021 12:58:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A5=E5=8F=A3=E9=80=9F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/UsersController.php | 2 +- package.json | 2 +- public/js/app.js | 2 +- public/js/build/107.js | 2 +- public/js/build/126.js | 2 +- public/js/build/726.js | 2 +- resources/assets/js/components/UserAvatar.vue | 38 ++++---- resources/assets/js/components/UserInput.vue | 48 +++++----- resources/assets/js/store/actions.js | 95 +++++++++++-------- resources/assets/js/store/state.js | 8 +- 10 files changed, 115 insertions(+), 86 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 399ab49b5..1b5dbc10e 100755 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -363,7 +363,7 @@ public function search() * @apiGroup users * @apiName basic * - * @apiParam {Number} userid 会员ID(多个格式:jsonArray,一次最多30个) + * @apiParam {Number} userid 会员ID(多个格式:jsonArray,一次最多50个) * * @apiSuccess {Number} ret 返回状态码(1正确、0错误) * @apiSuccess {String} msg 返回信息(错误描述) diff --git a/package.json b/package.json index 696b29843..23122339a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DooTask", - "version": "0.3.69", + "version": "0.3.68", "description": "DooTask is task management system.", "scripts": { "start": "./cmd dev", diff --git a/public/js/app.js b/public/js/app.js index 242d96b9b..b7f8ea4ad 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(()=>{var e,t,n,i,r,a={12631:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C});var i=n(88239),r=n(72444),a=/%[sdj%]/g;function o(){for(var e=arguments.length,t=Array(e),n=0;n=o)return e;switch(e){case"%s":return String(t[i++]);case"%d":return Number(t[i++]);case"%j":try{return JSON.stringify(t[i++])}catch(e){return"[Circular]"}break;default:return e}})),l=t[i];i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},m={integer:function(e){return m.number(e)&&parseInt(e,10)===e},float:function(e){return m.number(e)&&!m.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(void 0===e?"undefined":(0,r.Z)(e))&&!m.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(p.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(p.url)},hex:function(e){return"string"==typeof e&&!!e.match(p.hex)}};const v=function(e,t,n,i,a){if(e.required&&void 0===t)h(e,t,n,i,a);else{var s=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(s)>-1?m[s](t)||i.push(o(a.messages.types[s],e.fullField,e.type)):s&&(void 0===t?"undefined":(0,r.Z)(t))!==e.type&&i.push(o(a.messages.types[s],e.fullField,e.type))}};const g={required:h,whitespace:f,type:v,range:function(e,t,n,i,r){var a="number"==typeof e.len,s="number"==typeof e.min,l="number"==typeof e.max,u=t,c=null,d="number"==typeof t,h="string"==typeof t,f=Array.isArray(t);if(d?c="number":h?c="string":f&&(c="array"),!c)return!1;f&&(u=t.length),h&&(u=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?u!==e.len&&i.push(o(r.messages[c].len,e.fullField,e.len)):s&&!l&&ue.max?i.push(o(r.messages[c].max,e.fullField,e.max)):s&&l&&(ue.max)&&i.push(o(r.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,t,n,i,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&i.push(o(r.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,i,r){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||i.push(o(r.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||i.push(o(r.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};const y=function(e,t,n,i,r){var a=e.type,o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,a)&&!e.required)return n();g.required(e,t,i,o,r,a),s(t,a)||g.type(e,t,i,o,r)}n(o)},b={string:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,"string")&&!e.required)return n();g.required(e,t,i,a,r,"string"),s(t,"string")||(g.type(e,t,i,a,r),g.range(e,t,i,a,r),g.pattern(e,t,i,a,r),!0===e.whitespace&&g.whitespace(e,t,i,a,r))}n(a)},method:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&g.type(e,t,i,a,r)}n(a)},number:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},boolean:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&g.type(e,t,i,a,r)}n(a)},regexp:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),s(t)||g.type(e,t,i,a,r)}n(a)},integer:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},float:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},array:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,"array")&&!e.required)return n();g.required(e,t,i,a,r,"array"),s(t,"array")||(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},object:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&g.type(e,t,i,a,r)}n(a)},enum:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),t&&g.enum(e,t,i,a,r)}n(a)},pattern:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,"string")&&!e.required)return n();g.required(e,t,i,a,r),s(t,"string")||g.pattern(e,t,i,a,r)}n(a)},date:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();if(g.required(e,t,i,a,r),!s(t)){var o=void 0;o="number"==typeof t?new Date(t):t,g.type(e,o,i,a,r),o&&g.range(e,o.getTime(),i,a,r)}}n(a)},url:y,hex:y,email:y,required:function(e,t,n,i,a){var o=[],s=Array.isArray(t)?"array":void 0===t?"undefined":(0,r.Z)(t);g.required(e,t,i,o,a,s),n(o)}};function _(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var w=_();function x(e){this.rules=null,this._messages=w,this.define(e)}x.prototype={messages:function(e){return e&&(this._messages=d(_(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(void 0===e?"undefined":(0,r.Z)(e))||Array.isArray(e))throw new Error("Rules must be an object");this.rules={};var t=void 0,n=void 0;for(t in e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments[2],s=e,l=n,h=a;if("function"==typeof l&&(h=l,l={}),this.rules&&0!==Object.keys(this.rules).length){if(l.messages){var f=this.messages();f===w&&(f=_()),d(f,l.messages),l.messages=f}else l.messages=this.messages();var p=void 0,m=void 0,v={},g=l.keys||Object.keys(this.rules);g.forEach((function(n){p=t.rules[n],m=s[n],p.forEach((function(r){var a=r;"function"==typeof a.transform&&(s===e&&(s=(0,i.Z)({},s)),m=s[n]=a.transform(m)),(a="function"==typeof a?{validator:a}:(0,i.Z)({},a)).validator=t.getValidationMethod(a),a.field=n,a.fullField=a.fullField||n,a.type=t.getType(a),a.validator&&(v[n]=v[n]||[],v[n].push({rule:a,value:m,source:s,field:n}))}))}));var y={};u(v,l,(function(e,t){var n=e.rule,a=!("object"!==n.type&&"array"!==n.type||"object"!==(0,r.Z)(n.fields)&&"object"!==(0,r.Z)(n.defaultField));function s(e,t){return(0,i.Z)({},t,{fullField:n.fullField+"."+e})}function u(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=r;if(Array.isArray(u)||(u=[u]),u.length,u.length&&n.message&&(u=[].concat(n.message)),u=u.map(c(n)),l.first&&u.length)return y[n.field]=1,t(u);if(a){if(n.required&&!e.value)return u=n.message?[].concat(n.message).map(c(n)):l.error?[l.error(n,o(l.messages.required,n.field))]:[],t(u);var d={};if(n.defaultField)for(var h in e.value)e.value.hasOwnProperty(h)&&(d[h]=n.defaultField);for(var f in d=(0,i.Z)({},d,e.rule.fields))if(d.hasOwnProperty(f)){var p=Array.isArray(d[f])?d[f]:[d[f]];d[f]=p.map(s.bind(null,f))}var m=new x(d);m.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),m.validate(e.value,e.rule.options||l,(function(e){t(e&&e.length?u.concat(e):e)}))}else t(u)}a=a&&(n.required||!n.required&&e.value),n.field=e.field;var d=n.validator(n,e.value,u,e.source,l);d&&d.then&&d.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){b(e)}))}else h&&h();function b(e){var t,n=void 0,i=void 0,r=[],a={};for(n=0;n{var t=/^(attrs|props|on|nativeOn|class|style|hook)$/;function n(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}e.exports=function(e){return e.reduce((function(e,i){var r,a,o,s,l;for(o in i)if(r=e[o],a=i[o],r&&t.test(o))if("class"===o&&("string"==typeof r&&(l=r,e[o]=r={},r[l]=!0),"string"==typeof a&&(l=a,i[o]=a={},a[l]=!0)),"on"===o||"nativeOn"===o||"hook"===o)for(s in a)r[s]=n(r[s],a[s]);else if(Array.isArray(r))e[o]=r.concat(a);else if(Array.isArray(a))e[o]=[r].concat(a);else for(s in a)r[s]=a[s];else e[o]=i[o];return e}),{})}},45961:(e,t,n)=>{"use strict";var i=n(70538),r=n(20629);const a={name:"Spinner"};var o=n(51900);const s={components:{Spinner:(0,o.Z)(a,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"common-spinner",attrs:{id:"common-spinner"}},[t("Loading",{staticClass:"common-circular"})],1)}),[],!1,null,null,null).exports},data:function(){return{transitionName:null}},mounted:function(){var e=this,t=window.location.hash;0===t.indexOf("#")&&(t=t.substr(1))&&this.$nextTick((function(){t=$A.removeURLParameter(t,"token"),e.goForward({path:t})})),this.sessionStorage("/",1);var n=window.location.pathname;n&&0===this.sessionStorage(n)&&this.sessionStorage(n,this.sessionStorage("::count")+1),setInterval(this.searchEnter,1e3),window.addEventListener("resize",this.windowMax768Listener)},beforeDestroy:function(){window.removeEventListener("resize",this.windowMax768Listener)},watch:{$route:function(e,t){null!==this.transitionName?void 0!==e.name&&void 0!==t.name&&this.slideType(e,t):this.transitionName="app-slide-no"}},methods:{slideType:function(e,t){var n=this.$router.isBack;this.$router.isBack=!1;var i=this.sessionStorage(e.path),r=this.sessionStorage(t.path);i&&i=0&&(t=e.slice(i),e=e.slice(0,i));var r=e.indexOf("?");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{path:e,query:n,hash:t}}(r.path||""),u=t&&t.path||"/",c=l.path?j(l.path,u,n||r.append):u,d=function(e,t,n){void 0===t&&(t={});var i,r=n||w;try{i=r(e||"")}catch(e){i={}}for(var a in t){var o=t[a];i[a]=Array.isArray(o)?o.map(_):_(o)}return i}(l.query,r.query,i&&i.options.parseQuery),h=r.hash||l.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:c,query:d,hash:h}}var te,ne=function(){},ie={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,i=this.$route,r=n.resolve(this.to,i,this.append),a=r.location,o=r.route,s=r.href,l={},u=n.options.linkActiveClass,c=n.options.linkExactActiveClass,d=null==u?"router-link-active":u,h=null==c?"router-link-exact-active":c,f=null==this.activeClass?d:this.activeClass,m=null==this.exactActiveClass?h:this.exactActiveClass,v=o.redirectedFrom?k(null,ee(o.redirectedFrom),null,n):o;l[m]=D(i,v,this.exactPath),l[f]=this.exact||this.exactPath?l[m]:function(e,t){return 0===e.path.replace(C,"/").indexOf(t.path.replace(C,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(i,v);var g=l[m]?this.ariaCurrentValue:null,y=function(e){re(e)&&(t.replace?n.replace(a,ne):n.push(a,ne))},b={click:re};Array.isArray(this.event)?this.event.forEach((function(e){b[e]=y})):b[this.event]=y;var _={class:l},w=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:o,navigate:y,isActive:l[f],isExactActive:l[m]});if(w){if(1===w.length)return w[0];if(w.length>1||!w.length)return 0===w.length?e():e("span",{},w)}if("a"===this.tag)_.on=b,_.attrs={href:s,"aria-current":g};else{var x=ae(this.$slots.default);if(x){x.isStatic=!1;var S=x.data=p({},x.data);for(var O in S.on=S.on||{},S.on){var $=S.on[O];O in b&&(S.on[O]=Array.isArray($)?$:[$])}for(var T in b)T in S.on?S.on[T].push(b[T]):S.on[T]=y;var E=x.data.attrs=p({},x.data.attrs);E.href=s,E["aria-current"]=g}else _.on=b}return e(this.tag,_,this.$slots.default)}};function re(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function ae(e){if(e)for(var t,n=0;n-1&&(s.params[h]=n.params[h]);return s.path=Q(c.path,s.params),l(c,s,o)}if(s.path){s.params={};for(var f=0;f=e.length?n():e[r]?t(e[r],(function(){i(r+1)})):i(r+1)};i(0)}var Pe={redirected:2,aborted:4,cancelled:8,duplicated:16};function Ie(e,t){return Ae(e,t,Pe.redirected,'Redirected when going from "'+e.fullPath+'" to "'+function(e){if("string"==typeof e)return e;if("path"in e)return e.path;var t={};return Ne.forEach((function(n){n in e&&(t[n]=e[n])})),JSON.stringify(t,null,2)}(t)+'" via a navigation guard.')}function je(e,t){return Ae(e,t,Pe.cancelled,'Navigation cancelled from "'+e.fullPath+'" to "'+t.fullPath+'" with a new navigation.')}function Ae(e,t,n,i){var r=new Error(i);return r._isRouter=!0,r.from=e,r.to=t,r.type=n,r}var Ne=["params","query","hash"];function Fe(e){return Object.prototype.toString.call(e).indexOf("Error")>-1}function Le(e,t){return Fe(e)&&e._isRouter&&(null==t||e.type===t)}function Ve(e){return function(t,n,i){var r=!1,a=0,o=null;Re(e,(function(e,t,n,s){if("function"==typeof e&&void 0===e.cid){r=!0,a++;var l,u=We((function(t){var r;((r=t).__esModule||ze&&"Module"===r[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:te.extend(t),n.components[s]=t,--a<=0&&i()})),c=We((function(e){var t="Failed to resolve async component "+s+": "+e;o||(o=Fe(e)?e:new Error(t),i(o))}));try{l=e(u,c)}catch(e){c(e)}if(l)if("function"==typeof l.then)l.then(u,c);else{var d=l.component;d&&"function"==typeof d.then&&d.then(u,c)}}})),r||i()}}function Re(e,t){return Be(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function Be(e){return Array.prototype.concat.apply([],e)}var ze="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function We(e){var t=!1;return function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(!t)return t=!0,e.apply(this,n)}}var He=function(e,t){this.router=e,this.base=function(e){if(!e)if(oe){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=O,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function qe(e,t,n,i){var r=Re(e,(function(e,i,r,a){var o=function(e,t){"function"!=typeof e&&(e=te.extend(e));return e.options[t]}(e,t);if(o)return Array.isArray(o)?o.map((function(e){return n(e,i,r,a)})):n(o,i,r,a)}));return Be(i?r.reverse():r)}function Ke(e,t){if(t)return function(){return e.apply(t,arguments)}}He.prototype.listen=function(e){this.cb=e},He.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},He.prototype.onError=function(e){this.errorCbs.push(e)},He.prototype.transitionTo=function(e,t,n){var i,r=this;try{i=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var a=this.current;this.confirmTransition(i,(function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.router.afterHooks.forEach((function(e){e&&e(i,a)})),r.ready||(r.ready=!0,r.readyCbs.forEach((function(e){e(i)})))}),(function(e){n&&n(e),e&&!r.ready&&(Le(e,Pe.redirected)&&a===O||(r.ready=!0,r.readyErrorCbs.forEach((function(t){t(e)}))))}))},He.prototype.confirmTransition=function(e,t,n){var i=this,r=this.current;this.pending=e;var a,o,s=function(e){!Le(e)&&Fe(e)&&(i.errorCbs.length?i.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)},l=e.matched.length-1,u=r.matched.length-1;if(D(e,r)&&l===u&&e.matched[l]===r.matched[u])return this.ensureURL(),s(((o=Ae(a=r,e,Pe.duplicated,'Avoided redundant navigation to current location: "'+a.fullPath+'".')).name="NavigationDuplicated",o));var c=function(e,t){var n,i=Math.max(e.length,t.length);for(n=0;n0)){var t=this.router,n=t.options.scrollBehavior,i=Te&&n;i&&this.listeners.push(ye());var r=function(){var n=e.current,r=Ye(e.base);e.current===O&&r===e._startLocation||e.transitionTo(r,(function(e){i&&be(t,e,n,!0)}))};window.addEventListener("popstate",r),this.listeners.push((function(){window.removeEventListener("popstate",r)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){De(A(i.base+e.fullPath)),be(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){Ee(A(i.base+e.fullPath)),be(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(Ye(this.base)!==this.current.fullPath){var t=A(this.base+this.current.fullPath);e?De(t):Ee(t)}},t.prototype.getCurrentLocation=function(){return Ye(this.base)},t}(He);function Ye(e){var t=window.location.pathname;return e&&0===t.toLowerCase().indexOf(e.toLowerCase())&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var Ge=function(e){function t(t,n,i){e.call(this,t,n),i&&function(e){var t=Ye(e);if(!/^\/#/.test(t))return window.location.replace(A(e+"/#"+t)),!0}(this.base)||Xe()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=Te&&t;n&&this.listeners.push(ye());var i=function(){var t=e.current;Xe()&&e.transitionTo(Je(),(function(i){n&&be(e.router,i,t,!0),Te||et(i.fullPath)}))},r=Te?"popstate":"hashchange";window.addEventListener(r,i),this.listeners.push((function(){window.removeEventListener(r,i)}))}},t.prototype.push=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){Qe(e.fullPath),be(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){et(e.fullPath),be(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;Je()!==t&&(e?Qe(t):et(t))},t.prototype.getCurrentLocation=function(){return Je()},t}(He);function Xe(){var e=Je();return"/"===e.charAt(0)||(et("/"+e),!1)}function Je(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function Ze(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function Qe(e){Te?De(Ze(e)):window.location.hash=e}function et(e){Te?Ee(Ze(e)):window.location.replace(Ze(e))}var tt=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var i=this;this.transitionTo(e,(function(e){i.stack=i.stack.slice(0,i.index+1).concat(e),i.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var i=this;this.transitionTo(e,(function(e){i.stack=i.stack.slice(0,i.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var i=this.stack[n];this.confirmTransition(i,(function(){var e=t.current;t.index=n,t.updateRoute(i),t.router.afterHooks.forEach((function(t){t&&t(i,e)}))}),(function(e){Le(e,Pe.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(He),nt=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=ce(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!Te&&!1!==e.fallback,this.fallback&&(t="hash"),oe||(t="abstract"),this.mode=t,t){case"history":this.history=new Ue(this,e.base);break;case"hash":this.history=new Ge(this,e.base,this.fallback);break;case"abstract":this.history=new tt(this,e.base);break;default:0}},it={currentRoute:{configurable:!0}};function rt(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}nt.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},it.currentRoute.get=function(){return this.history&&this.history.current},nt.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof Ue||n instanceof Ge){var i=function(e){n.setupListeners(),function(e){var i=n.current,r=t.options.scrollBehavior;Te&&r&&"fullPath"in e&&be(t,e,i,!1)}(e)};n.transitionTo(n.getCurrentLocation(),i,i)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},nt.prototype.beforeEach=function(e){return rt(this.beforeHooks,e)},nt.prototype.beforeResolve=function(e){return rt(this.resolveHooks,e)},nt.prototype.afterEach=function(e){return rt(this.afterHooks,e)},nt.prototype.onReady=function(e,t){this.history.onReady(e,t)},nt.prototype.onError=function(e){this.history.onError(e)},nt.prototype.push=function(e,t,n){var i=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){i.history.push(e,t,n)}));this.history.push(e,t,n)},nt.prototype.replace=function(e,t,n){var i=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){i.history.replace(e,t,n)}));this.history.replace(e,t,n)},nt.prototype.go=function(e){this.history.go(e)},nt.prototype.back=function(){this.go(-1)},nt.prototype.forward=function(){this.go(1)},nt.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},nt.prototype.resolve=function(e,t,n){var i=ee(e,t=t||this.history.current,n,this),r=this.match(i,t),a=r.redirectedFrom||r.fullPath;return{location:i,route:r,href:function(e,t,n){var i="hash"===n?"#"+t:t;return e?A(e+"/"+i):i}(this.history.base,a,this.mode),normalizedTo:i,resolved:r}},nt.prototype.getRoutes=function(){return this.matcher.getRoutes()},nt.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==O&&this.history.transitionTo(this.history.getCurrentLocation())},nt.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==O&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(nt.prototype,it),nt.install=function e(t){if(!e.installed||te!==t){e.installed=!0,te=t;var n=function(e){return void 0!==e},i=function(e,t){var i=e.$options._parentVnode;n(i)&&n(i=i.data)&&n(i=i.registerRouteInstance)&&i(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,i(this,this)},destroyed:function(){i(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",P),t.component("RouterLink",ie);var r=t.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.beforeRouteUpdate=r.created}},nt.version="3.5.1",nt.isNavigationFailure=Le,nt.NavigationFailureType=Pe,nt.START_LOCATION=O,oe&&window.Vue&&window.Vue.use(nt);const at=nt;var ot=n(40158),st=n.n(ot);function lt(e){return function(e){if(Array.isArray(e))return ut(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ut(e,t)}(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 ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=t)return e;for(var i="",r=0;r1&&void 0!==arguments[1]?arguments[1]:null,n=this.storage(e);return n||t},getStorageString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.storage(e);return"string"==typeof n||"number"==typeof n?n:t},getStorageInt:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.storage(e);return"number"==typeof n?n:t},getStorageBoolean:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.storage(e);return"boolean"==typeof n?n:t},getStorageArray:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.storage(e);return this.isArray(n)?n:t},getStorageJson:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.storage(e);return this.isJson(n)?n:t},isArray:function(e){return"object"==mt(e)&&"[object array]"==Object.prototype.toString.call(e).toLowerCase()&&"number"==typeof e.length},isJson:function(e){return"object"==mt(e)&&"[object object]"==Object.prototype.toString.call(e).toLowerCase()&&void 0===e.length},inArray:function(e,t){return!!this.isArray(t)&&t.includes(e)},storage:function(e,t){if(e){var n="__state__";if("cache"===e.substring(0,5)&&(n="__state:"+e+"__"),void 0===t)return this.loadFromlLocal(e,"",n);this.savaToLocal(e,t,n)}},savaToLocal:function(e,t,n){try{void 0===n&&(n="__seller__");var i=window.localStorage[n];(i=i?JSON.parse(i):{})[e]=t,window.localStorage[n]=JSON.stringify(i)}catch(e){}},loadFromlLocal:function(e,t,n){try{void 0===n&&(n="__seller__");var i=window.localStorage[n];return i&&((i=JSON.parse(i))&&void 0!==i[e])?i[e]:t}catch(e){return t}},clearLocal:function(){try{window.localStorage.clear()}catch(e){}},runNum:function(e,t){var n=Number(e);if((n+""=="NaN"&&(n=0),/^[0-9]*[1-9][0-9]*$/.test(t))&&(n=n.toFixed(t)).indexOf(".")<0){n+=".";for(var i=0;i0){window.__projectId=t;var n=e.method.cloneJSON(e.projects.find((function(e){return e.id==t})));if(n)return n.columns=e.method.cloneJSON(e.columns.filter((function(e){return e.project_id==n.id}))).sort((function(e,t){return e.sort!=t.sort?e.sort-t.sort:e.id-t.id})),n.columns.forEach((function(t){t.tasks=e.method.cloneJSON(e.tasks.filter((function(e){return e.column_id==t.id}))).sort((function(e,t){return e.sort!=t.sort?e.sort-t.sort:e.id-t.id}))})),Object.freeze(n)}return{columns:[],project_user:[]}},taskData:function(e){var t=e.taskId;if(0==t&&(t=e.method.runNum(window.__taskId)),t>0){window.__taskId=t;var n=e.tasks.find((function(e){return e.id==t}));if(n)return n}return{}},tablePanel:function(e){return function(t){if(!e.projectId)return!1;var n=e.cacheTablePanel.find((function(t){return t.project_id==e.projectId}));return n||(n={project_id:e.projectId,card:!0,chat:!1,showMy:!0,showUndone:!0,showCompleted:!1,completedTask:!1},e.cacheTablePanel.push(n)),n&&!!n[t]}}};function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _t={call:function(e,t){var n=e.state,i=e.dispatch;return n.method.isJson(t)||(t={url:t}),n.method.isJson(t.header)||(t.header={}),t.url=n.method.apiUrl(t.url),t.data=n.method.date2string(t.data),t.header["Content-Type"]="application/json",t.header.language=$A.getLanguage(),t.header.token=n.userToken,t.header.fd=n.method.getStorageString("userWsFd"),new Promise((function(e,r){if(!0===t.spinner){var a=document.getElementById("common-spinner");if(a){var o=t.before;t.before=function(){n.ajaxLoadNum++,a.style.display="block","function"==typeof o&&o()};var s=t.complete;t.complete=function(){n.ajaxLoadNum--,n.ajaxLoadNum<=0&&(a.style.display="none"),"function"==typeof s&&s()}}}if(t.success=function(a,o,s){if(!n.method.isJson(a))return console.log(a,o,s),void r({data:{},msg:"Return error"});var l=a.ret,u=a.data,c=a.msg;-1!==l||!1===t.checkRole?1===l?e({data:u,msg:c}):r({data:u,msg:c||"Unknown error"}):$A.modalError({content:c,onOk:function(){i("logout")}})},t.error=function(){r({data:{},msg:"System error"})},!0===t.websocket||!0===t.ws){var l=n.method.randomString(16),u=setTimeout((function(){var e=n.ajaxWsListener.find((function(e){return e.apiWebsocket==l}));e&&(e.complete(),e.error("timeout"),e.after()),n.ajaxWsListener=n.ajaxWsListener.filter((function(e){return e.apiWebsocket!=l}))}),t.timeout||3e4);n.ajaxWsListener.push({apiWebsocket:l,complete:"function"==typeof t.complete?t.complete:function(){},success:"function"==typeof t.success?t.success:function(){},error:"function"==typeof t.error?t.error:function(){},after:"function"==typeof t.after?t.after:function(){}}),t.complete=function(){},t.success=function(){},t.error=function(){},t.after=function(){},t.header["Api-Websocket"]=l,!1===n.ajaxWsReady&&(n.ajaxWsReady=!0,i("websocketMsgListener",{name:"apiWebsocket",callback:function(e){switch(e.type){case"apiWebsocket":clearTimeout(u);var t=e.apiWebsocket,i=e.apiSuccess,r=e.data,a=n.ajaxWsListener.find((function(e){return e.apiWebsocket==t}));a&&(a.complete(),i?a.success(r):a.error(r),a.after()),n.ajaxWsListener=n.ajaxWsListener.filter((function(e){return e.apiWebsocket!=t}))}}}))}$A.ajaxc(t)}))},toggleTablePanel:function(e,t){var n=e.state;if(n.projectId){var i=n.cacheTablePanel.findIndex((function(e){return e.project_id==n.projectId}));-1===i&&(n.cacheTablePanel.push({project_id:n.projectId}),i=n.cacheTablePanel.findIndex((function(e){return e.project_id==n.projectId})));var r=n.cacheTablePanel[i];n.cacheTablePanel.splice(i,1,Object.assign(r,bt({},t,!r[t]))),n.method.setStorage("cacheTablePanel",n.cacheTablePanel)}},getUserInfo:function(e){var t=e.dispatch;return new Promise((function(e,n){t("call",{url:"users/info"}).then((function(n){t("saveUserInfo",n.data),e(n)})).catch((function(e){console.error(e),n(e)}))}))},saveUserInfo:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e){var r=n.method.cloneJSON(t);r.userid=n.method.runNum(r.userid),r.token=r.userid>0?r.token||n.userToken:"",n.userInfo=r,n.userId=r.userid,n.userToken=r.token,n.userIsAdmin=n.method.inArray("admin",r.identity),n.method.setStorage("userInfo",n.userInfo),n.projects=[],i("getProjects"),i("getDialogs"),i("websocketConnection"),e()}))},saveUserOnlineStatus:function(e,t){var n=e.state,i=t.userid,r=t.online;n.userOnline[i]!==r&&(n.userOnline=Object.assign({},n.userOnline,bt({},i,r)))},getUserBasic:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isJson(t)){var r=t.userid,a=t.success,o=t.complete;if(r!==n.userId){var s=n.method.Time(),l=[];(n.method.isArray(r)?r:[r]).some((function(e){if(n.cacheUserBasic[e]&&("function"==typeof a&&a(n.cacheUserBasic[e].data,!1),s-n.cacheUserBasic[e].time<=30))return!1;l.push(e)})),0!==l.length?!0!==n.cacheUserBasic["::load"]?(n.cacheUserBasic["::load"]=!0,i("call",{url:"users/basic",data:{userid:l}}).then((function(e){n.cacheUserBasic["::load"]=!1,"function"==typeof o&&o(),e.data.forEach((function(e){n.cacheUserBasic[e.userid]={time:s,data:e},n.method.setStorage("cacheUserBasic",n.cacheUserBasic),i("saveUserOnlineStatus",e),"function"==typeof a&&a(e,!0)}))})).catch((function(e){console.error(e),n.cacheUserBasic["::load"]=!1,"function"==typeof o&&o()}))):setTimeout((function(){i("getUserBasic",t)}),20):"function"==typeof o&&o()}else"function"==typeof a&&a(n.userInfo,!0)}},logout:function(e){var t=e.state,n=e.dispatch;t.method.clearLocal(),n("saveUserInfo",{}).then((function(){var e="/"==window.location.pathname?"":encodeURIComponent(window.location.href);$A.goForward({path:"/login",query:e?{from:e}:{}},!0)}))},saveFile:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isArray(t))t.forEach((function(e){i("saveFile",e)}));else if(n.method.isJson(t)){var r=n.files.findIndex((function(e){return e.id==t.id}));r>-1?n.files.splice(r,1,Object.assign(n.files[r],t)):n.files.push(t)}},forgetFile:function(e,t){var n=e.state,i=e.dispatch;n.files=n.files.filter((function(e){return e.id!=t})),n.files.forEach((function(e){e.pid==t&&i("forgetFile",e.id)}))},getFiles:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){i("call",{url:"file/lists",data:{pid:t}}).then((function(r){var a=r.data.map((function(e){return e.id}));n.files=n.files.filter((function(e){return e.pid!=t||a.includes(e.id)})),i("saveFile",r.data),e(r)})).catch((function(e){console.error(e),r(e)}))}))},searchFiles:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){n("call",{url:"file/search",data:{key:t}}).then((function(t){n("saveFile",t.data),e(t)})).catch((function(e){console.error(e),i(e)}))}))},saveProject:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isArray(t))t.forEach((function(e){i("saveProject",e)}));else if(n.method.isJson(t)){var r=n.projects.findIndex((function(e){return e.id==t.id}));r>-1?n.projects.splice(r,1,Object.assign(n.projects[r],t)):n.projects.push(t),setTimeout((function(){n.method.setStorage("cacheProjects",n.cacheProjects=n.projects)}))}},forgetProject:function(e,t){var n=e.state,i=n.projects.findIndex((function(e){return e.id==t}));if(i>-1&&n.projects.splice(i,1),n.projectId==t){var r=n.projects.find((function(e){var n=e.id;return n&&n!=t}));r?$A.goForward({path:"/manage/project/"+r.id}):$A.goForward({path:"/manage/dashboard"})}setTimeout((function(){n.method.setStorage("cacheProjects",n.cacheProjects=n.projects)}))},getProjects:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){if(0===n.userId)return n.projects=[],void r({msg:"Parameter error"});n.cacheProjects.length>0&&(n.projects=n.cacheProjects),i("call",{url:"project/lists",data:t||{}}).then((function(t){n.projectTotal=t.data.total_all,i("saveProject",t.data.data),e(t)})).catch((function(e){console.error(e),r(e)}))}))},getProjectOne:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?(n.projectLoad++,i("call",{url:"project/one",data:{project_id:t}}).then((function(t){n.projectLoad--,i("saveProject",t.data),e(t)})).catch((function(e){console.error(e),n.projectLoad--,r(e)}))):r({msg:"Parameter error"})}))},archivedProject:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/archived",data:{project_id:t}}).then((function(n){i("forgetProject",t),e(n)})).catch((function(e){console.error(e),i("getProjectOne",t),r(e)})):r({msg:"Parameter error"})}))},removeProject:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/remove",data:{project_id:t}}).then((function(n){i("forgetProject",t),e(n)})).catch((function(e){console.error(e),i("getProjectOne",t),r(e)})):r({msg:"Parameter error"})}))},exitProject:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/exit",data:{project_id:t}}).then((function(n){i("forgetProject",t),e(n)})).catch((function(e){console.error(e),i("getProjectOne",t),r(e)})):r({msg:"Parameter error"})}))},getProjectStatistics:function(e){var t=e.state;(0,e.dispatch)("call",{url:"project/statistics"}).then((function(e){var n=e.data;t.projectStatistics=n}))},saveColumn:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isArray(t))t.forEach((function(e){i("saveColumn",e)}));else if(n.method.isJson(t)){var r=n.columns.findIndex((function(e){return e.id==t.id}));r>-1?n.columns.splice(r,1,Object.assign(n.columns[r],t)):n.columns.push(t),setTimeout((function(){n.method.setStorage("cacheColumns",n.cacheColumns=n.columns)}))}},forgetColumn:function(e,t){var n=e.state,i=e.dispatch,r=n.columns.findIndex((function(e){return e.id==t}));r>-1&&(i("getProjectOne",n.columns[r].project_id),n.columns.splice(r,1)),setTimeout((function(){n.method.setStorage("cacheColumns",n.cacheColumns=n.columns)}))},getColumns:function(e,t){var n=e.state,i=e.dispatch;0!==n.userId?(n.cacheColumns.length>0&&(n.columns=n.cacheColumns),n.projectLoad++,i("call",{url:"project/column/lists",data:{project_id:t}}).then((function(e){n.projectLoad--;var r=e.data.data.map((function(e){return e.id}));r.length>0&&(n.columns=n.columns.filter((function(e){return e.project_id!=t||r.includes(e.id)}))),i("saveColumn",e.data.data)})).catch((function(e){console.error(e),n.projectLoad--}))):n.columns=[]},removeColumn:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/column/remove",data:{column_id:t}}).then((function(n){i("forgetColumn",t),e(n)})).catch((function(e){console.error(e),r(e)})):r({msg:"Parameter error"})}))},saveTask:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isArray(t))t.forEach((function(e){i("saveTask",e)}));else if(n.method.isJson(t)){var r=t.parent_id>0?"taskSubs":"tasks",a=n[r].findIndex((function(e){return e.id==t.id}));a>-1?n[r].splice(a,1,Object.assign(n[r][a],t)):n[r].push(t),a>-1&&t.parent_id&&i("getTaskOne",t.parent_id),t.is_update_complete&&i("getProjectOne",t.project_id),t.is_update_content&&i("getTaskContent",t.id),setTimeout((function(){"taskSubs"==r?n.method.setStorage("cacheTaskSubs",n.cacheTaskSubs=n[r]):n.method.setStorage("cacheTasks",n.cacheTasks=n[r])}))}},forgetTask:function(e,t){var n=e.state,i=e.dispatch,r=n.tasks.findIndex((function(e){return e.id==t})),a="tasks";-1===r&&(r=n.taskSubs.findIndex((function(e){return e.id==t})),a="taskSubs"),r>-1&&(n[a][r].parent_id&&i("getTaskOne",n[a][r].parent_id),"tasks"==a&&i("getProjectOne",n[a][r].project_id),n[a].splice(r,1)),n.taskId==t&&(n.taskId=0),setTimeout((function(){"taskSubs"==a?n.method.setStorage("cacheTaskSubs",n.cacheTaskSubs=n[a]):n.method.setStorage("cacheTasks",n.cacheTasks=n[a])}))},increaseTaskMsgNum:function(e,t){var n=e.state.tasks.find((function(e){return e.dialog_id===t}));n&&n.msg_num++},getTasks:function(e,t){var n=e.state,i=e.dispatch;0!==n.userId?(n.cacheTasks.length>0&&(n.tasks=n.cacheTasks),t.project_id&&n.projectLoad++,i("call",{url:"project/task/lists",data:t}).then((function(e){t.project_id&&n.projectLoad--;var r=e.data,a=r.data.map((function(e){return e.id}));if(a.length>0&&(t.project_id&&(n.tasks=n.tasks.filter((function(e){return e.project_id!=t.project_id||a.includes(e.id)}))),t.parent_id&&(n.taskSubs=n.taskSubs.filter((function(e){return e.parent_id!=t.parent_id||a.includes(e.id)})))),i("saveTask",r.data),r.next_page_url){var o=Object.assign(t,{page:r.current_page+1});r.current_page%5==0?$A.modalWarning({content:"数据已超过"+r.to+"条,是否继续加载?",onOk:function(){i("getTasks",o)}}):i("getTasks",o)}})).catch((function(e){console.error(e),t.project_id&&n.projectLoad--}))):n.tasks=[]},getTaskOne:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/task/one",data:{task_id:t}}).then((function(t){i("saveTask",t.data),e(t)})).catch((function(e){console.error(e),r(e)})):r({msg:"Parameter error"})}))},removeTask:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/task/remove",data:{task_id:t}}).then((function(n){i("forgetTask",t),e(n)})).catch((function(e){console.error(e),i("getTaskOne",t),r(e)})):r({msg:"Parameter error"})}))},archivedTask:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/task/archived",data:{task_id:t}}).then((function(n){i("forgetTask",t),e(n)})).catch((function(e){console.error(e),i("getTaskOne",t),r(e)})):r({msg:"Parameter error"})}))},getTaskContent:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/task/content",data:{task_id:t}}).then((function(t){var i=n.taskContents.findIndex((function(e){return e.id==t.data.id}));i>-1?n.taskContents.splice(i,1,t.data):n.taskContents.push(t.data),e(t)})).catch((function(e){console.error(e),r(e)})):r({msg:"Parameter error"})}))},getTaskFiles:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"project/task/files",data:{task_id:t}}).then((function(r){r.data.forEach((function(e){var t=n.taskFiles.findIndex((function(t){return t.id==e.id}));t>-1?n.taskFiles.splice(t,1,e):n.taskFiles.push(e)})),i("saveTask",{id:t,file_num:r.data.length}),e(r)})).catch((function(e){console.error(e),r(e)})):r({msg:"Parameter error"})}))},forgetTaskFile:function(e,t){var n=e.state,i=(e.dispatch,n.taskFiles.findIndex((function(e){return e.id==t})));i>-1&&n.taskFiles.splice(i,1)},openTask:function(e,t){var n=e.state,i=e.dispatch;n.taskId=t,t>0&&i("getTaskOne",t).then((function(){i("getTaskContent",t),i("getTaskFiles",t),i("getTasks",{parent_id:t})})).catch((function(e){var t=e.msg;$A.modalWarning({content:t,onOk:function(){n.taskId=0}})}))},taskAdd:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){var a=n.method.cloneJSON(n.method.date2string(t));n.method.isArray(a.column_id)&&(a.column_id=a.column_id.find((function(e){return e}))),i("call",{url:"project/task/add",data:a,method:"post"}).then((function(t){i("addTaskSuccess",t.data),e(t)})).catch((function(e){console.error(e),r(e)}))}))},taskAddSub:function(e,t){var n=e.dispatch;return new Promise((function(e,i){n("call",{url:"project/task/addsub",data:t}).then((function(t){n("addTaskSuccess",t.data),e(t)})).catch((function(e){console.error(e),i(e)}))}))},addTaskSuccess:function(e,t){var n=e.dispatch,i=t.new_column,r=t.task;i&&n("saveColumn",i),n("saveTask",r),r.parent_id?n("getTaskOne",r.parent_id):n("getProjectOne",r.project_id)},taskUpdate:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){var a=n.method.cloneJSON(n.method.date2string(t));i("call",{url:"project/task/update",data:a,method:"post"}).then((function(t){i("saveTask",t.data),e(t)})).catch((function(e){console.error(e),i("getTaskOne",a.task_id),r(e)}))}))},getTaskPriority:function(e){var t=e.state,n=e.dispatch;return new Promise((function(e,i){n("call",{url:"system/priority"}).then((function(n){t.taskPriority=n.data,e(n)})).catch((function(e){console.error(e),i(e)}))}))},saveDialog:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isArray(t))t.forEach((function(e){i("saveDialog",e)}));else if(n.method.isJson(t)){var r=n.dialogs.findIndex((function(e){return e.id==t.id}));r>-1?n.dialogs.splice(r,1,Object.assign(n.dialogs[r],t)):n.dialogs.push(t),setTimeout((function(){n.method.setStorage("cacheDialogs",n.cacheDialogs=n.dialogs)}))}},updateDialogLastMsg:function(e,t){var n=e.state,i=e.dispatch;n.dialogs.find((function(e){return e.id==t.dialog_id}))?i("saveDialog",{id:t.dialog_id,last_msg:t,last_at:n.method.formatDate("Y-m-d H:i:s")}):i("getDialogOne",t.dialog_id)},getDialogs:function(e){var t=e.state,n=e.dispatch;0!==t.userId?n("call",{url:"dialog/lists"}).then((function(e){n("saveDialog",e.data.data.reverse())})).catch((function(e){console.error(e)})):t.dialogs=[]},getDialogOne:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==n.method.runNum(t)?i("call",{url:"dialog/one",data:{dialog_id:t}}).then((function(t){i("saveDialog",t.data),e(t)})).catch((function(e){console.error(e),r(e)})):r({msg:"Parameter error"})}))},openDialogUserid:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){t!==n.userId?i("call",{url:"dialog/open/user",data:{userid:t}}).then((function(t){i("saveDialog",t.data),n.method.setStorage("messenger::dialogId",t.data.id),n.dialogOpenId=t.data.id,e(t)})).catch((function(e){console.error(e),r(e)})):r({msg:"Parameter error"})}))},moveDialogTop:function(e,t){var n=e.state,i=n.dialogs.findIndex((function(e){return e.id==t}));if(i>-1){var r=n.method.cloneJSON(n.dialogs[i]);n.dialogs.splice(i,1),n.dialogs.unshift(r)}},saveDialogMsg:function(e,t){var n=e.state,i=e.dispatch;if(n.method.isArray(t))t.forEach((function(e){i("saveDialogMsg",e)}));else if(n.method.isJson(t)){var r=n.dialogMsgs.findIndex((function(e){return e.id==t.id}));r>-1?n.dialogMsgs.splice(r,1,Object.assign(n.dialogMsgs[r],t)):n.dialogMsgs.push(t),setTimeout((function(){n.method.setStorage("cacheDialogMsgs",n.cacheDialogMsgs=n.dialogMsgs)}))}},getDialogMsgs:function(e,t){var n=e.state,i=e.dispatch,r=n.dialogs.find((function(e){return e.id==t}));r||(r={id:t},n.dialogs.push(r)),r.loading||(r.loading=!0,r.currentPage=1,r.hasMorePages=!1,i("call",{url:"dialog/msg/lists",data:{dialog_id:t,page:r.currentPage}}).then((function(e){r.loading=!1,r.currentPage=e.data.current_page,r.hasMorePages=!!e.data.next_page_url,i("saveDialog",r);var a=e.data.data.map((function(e){return e.id}));a.length>0&&(n.dialogMsgs=n.dialogMsgs.filter((function(e){return e.dialog_id!=t||a.includes(e.id)}))),i("saveDialog",e.data.dialog),i("saveDialogMsg",e.data.data)})).catch((function(e){console.error(e),r.loading=!1})))},getDialogMsgNextPage:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){var a=n.dialogs.find((function(e){return e.id==t}));a?a.hasMorePages?a.loading?r({msg:"Loading"}):(a.loading=!0,a.currentPage++,i("call",{url:"dialog/msg/lists",data:{dialog_id:t,page:a.currentPage}}).then((function(t){a.loading=!1,a.currentPage=t.data.current_page,a.hasMorePages=!!t.data.next_page_url,i("saveDialogMsg",t.data.data),e(t)})).catch((function(e){console.error(e),a.loading=!1,r(e)}))):r({msg:"No more page"}):r({msg:"Parameter error"})}))},dialogMsgRead:function(e,t){var n=e.state,i=e.dispatch;if(t.userid!=n.userId&&!0!==t.is_read){t.is_read=!0;var r=n.dialogs.find((function(e){return e.id==t.dialog_id}));r&&r.unread>0&&r.unread--,n.wsReadWaitList.push(t.id),clearTimeout(n.wsReadTimeout),n.wsReadTimeout=setTimeout((function(){i("websocketSend",{type:"readMsg",data:{id:n.method.cloneJSON(n.wsReadWaitList)}}),n.wsReadWaitList=[]}),20)}},websocketConnection:function(e){var t=e.state,n=e.dispatch;e.commit;if(clearTimeout(t.wsTimeout),0!==t.userId){var i=t.method.apiUrl("../ws");i=(i=i.replace("https://","wss://")).replace("http://","ws://"),i+="?action=web&token="+t.userToken,t.ws=new WebSocket(i),t.ws.onopen=function(e){},t.ws.onclose=function(e){t.ws=null,clearTimeout(t.wsTimeout),t.wsTimeout=setTimeout((function(){n("websocketConnection")}),3e3)},t.ws.onerror=function(e){t.ws=null,clearTimeout(t.wsTimeout),t.wsTimeout=setTimeout((function(){n("websocketConnection")}),3e3)},t.ws.onmessage=function(e){var i=t.method.jsonParse(event.data),r=i.type,a=i.msgId;switch(r){case"open":t.method.setStorage("userWsFd",i.data.fd);break;case"receipt":"function"==typeof t.wsCall[a]&&t.wsCall[a](i.body,!0),delete t.wsCall[a];break;case"line":n("saveUserOnlineStatus",i.data);break;default:switch(a&&n("websocketSend",{type:"receipt",msgId:a}),t.wsMsg=i,Object.values(t.wsListener).forEach((function(e){if("function"==typeof e)try{e(i)}catch(e){}})),r){case"dialog":!function(e){var i=e.mode,r=e.data,a=r.dialog_id;if("add"===i||"chat"===i){if(n("increaseTaskMsgNum",a),"chat"===i)return;var o=t.dialogs.find((function(e){return e.id==r.dialog_id}));o&&(r.userid!==t.userId&&-1===t.dialogMsgs.findIndex((function(e){return e.id==r.id}))&&o.unread++,n("moveDialogTop",a)),t.dialogMsgPush=r}n("saveDialogMsg",r),n("updateDialogLastMsg",r)}(i);break;case"project":!function(e){var t=e.action,i=e.data;switch(t){case"add":case"update":n("saveProject",i);break;case"detail":n("getProjectOne",i.id),n("getTasks",{project_id:i.id});break;case"archived":case"delete":n("forgetProject",i.id);break;case"sort":n("getTasks",{project_id:i.id})}}(i);break;case"projectColumn":!function(e){var t=e.action,i=e.data;switch(t){case"add":case"update":n("saveColumn",i);break;case"delete":n("forgetColumn",i.id)}}(i);break;case"projectTask":!function(e){var t=e.action,i=e.data;switch(t){case"add":n("addTaskSuccess",i);break;case"update":n("saveTask",i);break;case"dialog":n("saveTask",i),n("getDialogOne",i.dialog_id);break;case"upload":n("getTaskFiles",i.task_id);break;case"filedelete":n("forgetTaskFile",i.id);break;case"archived":case"delete":n("forgetTask",i.id)}}(i);break;case"file":!function(e){var t=e.action,i=e.data;switch(t){case"add":case"update":n("saveFile",i);break;case"delete":n("forgetFile",i.id)}}(i)}}}}else t.ws&&(t.ws.close(),t.ws=null)},websocketSend:function(e,t){var n=e.state;if(n.method.isJson(t)){var i=t.type,r=t.data,a=t.callback,o=void 0;if(n.ws){"function"==typeof a&&(o=n.method.randomString(16),n.wsCall[o]=a);try{n.ws.send(JSON.stringify({type:i,msgId:o,data:r}))}catch(e){"function"==typeof a&&a(null,!1)}}else"function"==typeof a&&a(null,!1)}else"function"==typeof a&&a(null,!1)},websocketPath:function(e,t){var n=e.state,i=e.dispatch;clearTimeout(n.wsPathTimeout),n.wsPathValue=t,n.wsPathTimeout=setTimeout((function(){n.wsPathValue==t&&i("websocketSend",{type:"path",data:{path:t}})}),1e3)},websocketMsgListener:function(e,t){var n=e.state,i=t.name,r=t.callback;"function"==typeof r?n.wsListener[i]=r:n.wsListener[i]&&delete n.wsListener[i]},websocketClose:function(e){var t=e.state;t.ws&&t.ws.close()}};i.default.use(r.ZP);const wt=new r.ZP.Store({state:gt,getters:yt,mutations:{},actions:_t});n(90091),n(92693);function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const kt={name:"PageTitle",props:{title:{type:[String,Number],default:""}},data:function(){return{pagePath:""}},activated:function(){this.updateTitle()},computed:function(e){for(var t=1;tMath.floor(e.offsetWidth),this.showTooltip&&this.existSlot){var i=this.$slots.default.map((function(e){return e.text?e.text:e.elm.innerText?e.elm.innerText:""}));this.tooltipContent=i.join("")}t=null},onClick:function(e){this.$emit("on-click",e)}}};const Dt=(0,o.Z)(Tt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ETooltip",{attrs:{content:e.tipText,placement:e.placement,effect:e.tooltipTheme,delay:e.delay,disabled:!e.showTooltip,"max-width":e.tooltipMaxWidth,transfer:""}},[n("span",{ref:"content",staticClass:"common-auto-tip",on:{mouseenter:e.handleTooltipIn,click:e.onClick}},[e.existSlot?[e._t("default")]:[e._v(e._s(e.content))]],2)])}),[],!1,null,null,null).exports;const Et={name:"TagInput",props:{value:{default:""},cut:{default:","},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},placeholder:{default:""},max:{default:0}},data:function(){var e=[];return this.value.split(",").forEach((function(t){t&&e.push(t)})),{minWidth:80,tis:"",tisTimeout:null,showPlaceholder:!0,content:"",disSource:e,isFocus:!1}},mounted:function(){this.wayMinWidth()},watch:{placeholder:function(){this.wayMinWidth()},value:function(e){var t=[];$A.count(e)>0&&e.split(",").forEach((function(e){e&&t.push(e)})),this.disSource=t},disSource:function(e){var t=this,n="";e.forEach((function(e){""!=n&&(n+=t.cut),n+=e})),this.$emit("input",n),this.$emit("on-change")}},computed:{placeholderText:function(){return this.disSource.length>0?"":this.placeholder}},methods:{focus:function(e){var t=this.$refs.myTextarea;t.focus(e);var n=(e||{}).cursor;if(n){var i=t.value.length;switch(n){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}},wayMinWidth:function(){var e=this;this.showPlaceholder=!0,this.$nextTick((function(){e.$refs.myPlaceholder&&(e.minWidth=Math.max(e.minWidth,e.$refs.myPlaceholder.offsetWidth)),setTimeout((function(){try{e.minWidth=Math.max(e.minWidth,e.$refs.myPlaceholder.offsetWidth),e.showPlaceholder=!1}catch(e){}$A(e.$refs.myPlaceholder).is(":visible")||e.wayMinWidth()}),500)}))},pasteText:function(e){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData("text");this.addTag(!1,t)},downEnter:function(e){e.preventDefault()},onFocus:function(){this.isFocus=!0},onBlur:function(){this.isFocus=!1,this.addTag(!1,this.content)},addTag:function(e,t){var n=this;if(!1===e||13===e.keyCode)return""!=t.trim()&&-1===this.disSource.indexOf(t.trim())&&this.disSource.push(t.trim()),this.content="",void(13===e.keyCode&&this.$nextTick((function(){n.$emit("on-enter",e)})));if(this.max>0&&this.disSource.length>=this.max)return this.content="",this.tis="最多只能添加"+this.max+"个",clearInterval(this.tisTimeout),void(this.tisTimeout=setTimeout((function(){n.tis=""}),2e3));var i=t.trim(),r=i.length-this.cut.length;""!=i&&i.substring(r)===this.cut&&(""!=(i=i.substring(0,r)).trim()&&-1===this.disSource.indexOf(i.trim())&&this.disSource.push(i.trim()),this.content="")},delTag:function(e){if(!1===e){if(""!==this.content)return;e=this.disSource.length-1}this.disSource.splice(e,1),this.focus()}}};const Mt=(0,o.Z)(Et,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-tag-input",class:{focus:e.isFocus},on:{paste:function(t){return e.pasteText(t)},click:e.focus}},[e._l(e.disSource,(function(t,i){return n("div",{staticClass:"tags-item"},[n("span",{staticClass:"tags-content",on:{click:function(e){e.stopPropagation()}}},[e._v(e._s(t))]),n("span",{staticClass:"tags-del",on:{click:function(t){return t.stopPropagation(),e.delTag(i)}}},[e._v("×")])])})),e._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.content,expression:"content"}],ref:"myTextarea",staticClass:"tags-input",style:{minWidth:e.minWidth+"px"},attrs:{placeholder:e.tis||e.placeholderText,disabled:e.disabled,readonly:e.readonly},domProps:{value:e.content},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.downEnter(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:e.delTag(!1)}],keyup:function(t){return e.addTag(t,e.content)},focus:e.onFocus,blur:e.onBlur,input:function(t){t.target.composing||(e.content=t.target.value)}}}),e._v(" "),e.showPlaceholder||""!==e.tis?n("span",{ref:"myPlaceholder",staticClass:"tags-placeholder"},[e._v(e._s(e.tis||e.placeholderText))]):e._e()],2)}),[],!1,null,null,null).exports;var Pt=n(3869),It=n.n(Pt);i.default.use(It());const jt={name:"TableAction",props:{column:{type:Object,default:function(){return{}}},autoWidth:{type:Boolean,default:!0},minWidth:{type:Number,default:80},align:{type:String,default:""},menu:{type:Array,default:function(){return[]}}},data:function(){return{width:0,height:0}},mounted:function(){this.onUpdate()},activated:function(){this.onUpdate()},beforeUpdate:function(){this.onUpdate()},computed:{tdStyle:function(){var e={};switch(this.align.toLowerCase()){case"left":e.justifyContent="flex-start";break;case"center":e.justifyContent="center";break;case"right":e.justifyContent="flex-end"}return e}},methods:{handleIn:function(){this.$refs.action.offsetWidth!=this.width&&this.onUpdate()},onUpdate:function(){this.onResize({width:this.$refs.action.offsetWidth,height:this.$refs.action.offsetHeight})},onResize:function(e){var t=this,n=e.width,i=e.height;if(this.autoWidth){$A(".ivu-table-column-"+this.column.__id).each((function(e,t){var r=$A(t).find(".td-action-container");r.length>0&&(n=Math.max(n,r[0].offsetWidth),i=Math.max(i,r[0].offsetHeight))})),this.width=n,this.height=i;var r=Math.max(this.minWidth,this.width+26);this.column.minWidth&&(r=Math.max(this.column.minWidth,r)),this.column.maxWidth&&(r=Math.min(this.column.maxWidth,r)),r!=this.column.width&&this.$nextTick((function(){t.$set(t.column,"width",r)}))}},onClick:function(e){this.$emit("action",e)}}};const At=(0,o.Z)(jt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"td-action",style:e.tdStyle,attrs:{"data-width":e.width,"data-height":e.height}},[n("div",{directives:[{name:"resize",rawName:"v-resize",value:e.onResize,expression:"onResize"}],ref:"action",staticClass:"td-action-container",class:{"td-action-menu":e.menu.length>0},on:{mouseenter:e.handleIn}},[e._t("default"),e._v(" "),e._l(e.menu,(function(t,i){return n("ETooltip",{key:i,attrs:{placement:"top",disabled:!t.title,content:t.title,enterable:!1,"open-delay":600}},[t.children&&t.children.length>0?n("EDropdown",{staticClass:"menu-dropdown",attrs:{size:"medium",trigger:"click"},on:{command:e.onClick}},[n("i",{staticClass:"aliicon menu-icon",style:t.style||{},domProps:{innerHTML:e._s(t.icon)}}),e._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(t.children,(function(t,i){return n("EDropdownItem",{key:i,style:t.style||{},attrs:{command:t.action,divided:!!t.divided}},[n("div",[e._v(e._s(t.title))])])})),1)],1):n("i",{staticClass:"aliicon menu-icon",style:t.style||{},domProps:{innerHTML:e._s(t.icon)},on:{click:function(n){return e.onClick(t.action)}}})],1)}))],2)])}),[],!1,null,null,null).exports;const Nt={name:"QuickEdit",directives:{clickoutside:{bind:function(e,t,n){function i(n){if(e.contains(n.target))return!1;t.expression&&t.value(n)}e.__vueClickOutside__=i,document.addEventListener("click",i)},update:function(){},unbind:function(e,t){document.removeEventListener("click",e.__vueClickOutside__),delete e.__vueClickOutside__}}},props:{value:{},autoEdit:{},isTag:{type:Boolean,default:!1},alwaysIcon:{type:Boolean,default:!1}},data:function(){return{isLoad:!1,isEdit:!1,content:""}},mounted:function(){!0===this.autoEdit&&this.onEdit()},watch:{isEdit:function(e){this.$emit("on-edit-change",e)},autoEdit:function(e){!0===e&&this.onEdit()}},methods:{onEdit:function(){var e=this;this.content=this.value,this.isEdit=!0,this.$nextTick((function(){e.$refs.input.focus({cursor:"all"})}))},onEnter:function(){var e=this;this.content!=this.value?this.isLoad||(this.isLoad=!0,this.$emit("input",this.content),this.$emit("on-update",this.content,(function(){e.isEdit=!1,e.isLoad=!1}))):this.isEdit=!1}}};const Ft=(0,o.Z)(Nt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"quick-edit",class:[e.alwaysIcon?"quick-always":""]},[e.isEdit?n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.onEnter,expression:"onEnter"}],staticClass:"quick-input"},[e.isTag?n("TagInput",{ref:"input",attrs:{disabled:e.isLoad},on:{"on-enter":e.onEnter},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}):n("Input",{ref:"input",attrs:{disabled:e.isLoad},on:{"on-enter":e.onEnter},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}),e._v(" "),e.isLoad?n("div",{staticClass:"quick-loading"},[n("Loading")],1):e._e()],1):[n("div",{staticClass:"quick-text"},[e._t("default")],2),e._v(" "),n("Icon",{staticClass:"quick-icon",attrs:{type:"ios-create-outline"},on:{click:function(t){return t.stopPropagation(),e.onEdit.apply(null,arguments)}}})]],2)}),[],!1,null,null,null).exports;function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Vt(e){for(var t=1;t0&&(e.border=t+"px solid "+(n||"#ffffff")),e},spotStyle:function(){var e=this.borderWitdh,t=this.size;return"default"===t&&(t=32),e>0&&(t-=e),32==t?{}:{transform:"scale("+Math.min(1.25,t/32)+")"}},nameStyle:function(){return this.showIcon?{}:{paddingLeft:0}},avatarSize:function(){var e=this.borderWitdh,t=this.size;return"default"===t&&(t=32),e>0?t-2*e:t},showImg:function(){var e=this.user.userimg;return!!e&&!$A.rightExists(e,"/avatar.png")},isDefault:function(){var e=this.user.userimg;return $A.strExists(e,"/avatar/default_")},nickname:function(){var e=this.user.nickname;if(!e)return"D";var t=e.substring(0,2);return/^[\u4e00-\u9fa5]+$/.test(t)&&(t=t.substring(0,1)),t||"D"}}),watch:{userid:function(){this.getData()},userInfo:function(e){e.userid==this.userid&&(this.user=e)},userOnline:function(e){this.user&&void 0!==e[this.user.userid]&&this.$set(this.user,"online",e[this.user.userid])}},methods:{getData:function(){this.userid&&(this.userid!=this.userInfo.userid?this.asynch?setTimeout(this.loadData):this.loadData():this.user=this.userInfo)},loadData:function(){var e=this;this.$store.dispatch("getUserBasic",{userid:this.userid,success:function(t){e.user=t}})},openDialog:function(){this.goForward({path:"/manage/messenger"}),this.$store.dispatch("openDialogUserid",this.userid)}}};const zt=(0,o.Z)(Bt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.user?n("ETooltip",{staticClass:"common-avatar",attrs:{"open-delay":600,disabled:e.tooltipDisabled,placement:e.tooltipPlacement}},[n("div",{staticClass:"common-avatar-transfer",attrs:{slot:"content"},slot:"content"},[e._t("default"),e._v(" "),n("p",[e._v(e._s(e.$L("昵称"))+": "+e._s(e.user.nickname))]),e._v(" "),n("p",[e._v(e._s(e.$L("职位/职称"))+": "+e._s(e.user.profession||"-"))]),e._v(" "),e.userId!=e.userid&&e.showIconMenu?n("div",{staticClass:"avatar-icons"},[n("Icon",{attrs:{type:"ios-chatbubbles"},on:{click:e.openDialog}})],1):e._e()],2),e._v(" "),n("div",{staticClass:"avatar-wrapper"},[e.showIcon?n("div",{class:["avatar-box",e.userId===e.userid||e.user.online?"online":""],style:e.boxStyle},[n("em",{style:e.spotStyle}),e._v(" "),e.showImg?n("EAvatar",{class:{"avatar-default":e.isDefault},attrs:{src:e.user.userimg,size:e.avatarSize}}):n("EAvatar",{staticClass:"avatar-text",attrs:{size:e.avatarSize}},[n("span",{style:e.spotStyle},[e._v(e._s(e.nickname))])])],1):e._e(),e._v(" "),e.showName?n("div",{staticClass:"avatar-name",style:e.nameStyle},[e._v(e._s(e.user.nickname))]):e._e()])]):e._e()}),[],!1,null,null,null).exports;var Wt=n(64720);function Ht(e){return(Ht="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})(e)}i.default.use(r.ZP),i.default.use(st()),i.default.use(at),i.default.use(pt),i.default.component("PageTitle",St),i.default.component("Loading",$t),i.default.component("AutoTip",Dt),i.default.component("TagInput",Mt),i.default.component("TableAction",At),i.default.component("QuickEdit",Ft),i.default.component("UserAvatar",zt),i.default.component("EAvatar",Wt.Avatar),i.default.component("ETooltip",Wt.Tooltip),i.default.component("EPopover",Wt.Popover),i.default.component("EDropdown",Wt.Dropdown),i.default.component("EDropdownMenu",Wt.DropdownMenu),i.default.component("EDropdownItem",Wt.DropdownItem),i.default.prototype.isElectron=!1;var qt=at.prototype.push;at.prototype.push=function(e){return qt.call(this,e).catch((function(e){return e}))};var Kt=new at({mode:"history",routes:f});st().LoadingBar.config({color:"#3fcc25",failedColor:"#ff0000"}),Kt.beforeEach((function(e,t,n){st().LoadingBar.start(),n()})),Kt.afterEach((function(){st().LoadingBar.finish()})),i.default.prototype.goForward=function(e,t){"string"==typeof e&&(e={name:e}),!0===t?Ut.$router.replace(e).then((function(){})):Ut.$router.push(e).then((function(){}))},i.default.prototype.goBack=function(e){var t=$A.jsonParse(window.sessionStorage.__history__||"{}");$A.runNum(t["::count"])>2?Ut.$router.go("number"==typeof e?e:-1):Ut.$router.replace("object"===Ht(e)?e:{path:"/"}).then((function(){}))},i.default.prototype.$A=$A,i.default.config.productionTip=!1;var Ut=new i.default({el:"#app",router:Kt,store:wt,template:"",components:{App:h}});$A.goForward=Ut.goForward,$A.goBack=Ut.goBack,$A.getLanguage=Ut.getLanguage,$A.Message=Ut.$Message,$A.Notice=Ut.$Notice,$A.Modal=Ut.$Modal,$A.store=Ut.$store,$A.L=Ut.$L},90091:(e,t,n)=>{function i(){return(i=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n0&&(t=e[e.length-1]),t},strExists:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",!0!==i&&(e=e.toLowerCase(),t=t.toLowerCase()),-1!==e.indexOf(t)},leftExists:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",!0!==i&&(e=e.toLowerCase(),t=t.toLowerCase()),e.substring(0,t.length)===t},leftDelete:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",this.leftExists(e,t,i)&&(e=e.substring(t.length)),e||""},rightExists:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",!0!==i&&(e=e.toLowerCase(),t=t.toLowerCase()),e.substring(e.length-t.length)===t},getMiddle:function(e,t,n){return e=e.toString(),this.ishave(t)&&this.strExists(e,t)&&(e=e.substring(e.indexOf(t)+t.length)),this.ishave(n)&&this.strExists(e,n)&&(e=e.substring(0,e.indexOf(n))),e},subString:function(e,t,n){return e+="",this.ishave(n)||(n=e.length),e.substring(t,n)},randomString:function(e){e=e||32;for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678oOLl9gqVvUuI1",n=t.length,i="",r=0;r=t)return e;for(var i="",r=0;r86400){var i=Math.floor(n/86400),r=Math.ceil((n-86400*i)/3600);return r>0?i+"天"+r+"小时":i+"天"}return n>3600?Math.ceil(n/3600)+"小时":n>60?Math.ceil(n/60)+"分钟":n>10?n+"秒":"刚刚"},isMobile:function(e){return/^1([3456789])\d{9}$/.test(e)},isPhone:function(e){return this.isMobile(e)},getDistance:function(e,t,n,i){var r,a,o,s,l,u=3.14159265359,c=6.28318530712,d=.01745329252,h=6370693.5;return r=t*d,a=i*d,(l=e*d-n*d)>u?l=c-l:l<-u&&(l=c+l),o=h*Math.cos(r)*l,s=h*(r-a),Math.sqrt(o*o+s*s).toFixed(0)},setTile:function(e){document.title=e;var t=navigator.userAgent.toLowerCase();if(/iphone|ipad|ipod/.test(t)){var n=document.createElement("iframe");n.style.display="none",n.setAttribute("src","/favicon.ico");n.addEventListener("load",(function e(){setTimeout((function(){n.removeEventListener("load",e),document.body.removeChild(n)}),0)})),document.body.appendChild(n)}},cloneData:function(e){return"object"!==o(e)||null===e?e:"number"==typeof e.length?r(e).slice(0):i({},e)},cloneJSON:function(e){return"object"!==o(e)||null===e?e:$A.jsonParse($A.jsonStringify(e))},jsonParse:function(e,t){if(null===e)return t||{};if("object"===o(e))return e;try{return JSON.parse(e.replace(/\n/g,"\\n").replace(/\r/g,"\\r"))}catch(e){return t||{}}},jsonStringify:function(e,t){if("object"!==o(e))return e;try{return JSON.stringify(e)}catch(e){return t||""}},resize:function(e,t){var n=$A(e);if(0!==n.length)var i=parseInt(n.outerHeight()),r=parseInt(n.outerWidth()),a=setInterval((function(){0===n.length&&clearInterval(a);var e=parseInt(n.outerHeight()),o=parseInt(n.outerWidth());i===e&&r===o||(i=e,r=o,console.log(r,i),"function"==typeof t&&t())}),250)},isIos:function(){var t=void 0!==e&&e.navigator.userAgent.toLowerCase();return t&&/iphone|ipad|ipod|ios/.test(t)},isAndroid:function(){var t=void 0!==e&&e.navigator.userAgent.toLowerCase();return t&&t.indexOf("android")>0},isWeixin:function(){return(void 0!==e&&e.navigator.userAgent.toLowerCase()).match(/MicroMessenger/i)+""=="micromessenger"},getObject:function(e,t){var n=e;if(0===this.count(e)||0===this.count(t))return"";var i=t.replace(/,/g,"|").replace(/\./g,"|").split("|");return $A.each(i,(function(e,t){n=void 0===n[t]?"":n[t]})),n},count:function(e){try{if(void 0===e)return 0;if("number"==typeof e&&(e+=""),"number"==typeof e.length)return e.length;var t,n=0;for(t in e)n++;return n}catch(e){return 0}},objImplode:function(e){var t=this;if(null===e)return"";var n="";return $A.each(e,(function(e,i){null!==i&&("object"===o(i)&&t.count(i)>0?n+=t.objImplode(i):n+=String(i))})),n.replace(/\s/g,"").replace(/undefined/g,"")},urlParameter:function(e){var t=this.urlParameterAll();return void 0===e?t:t[e]},urlParameterAll:function(){var t=e.location.search||"",n=[];this.strExists(t,"?")&&(n=this.getMiddle(t,"?").split("&"));for(var i={},r=0;r=2){for(var i=encodeURIComponent(t)+"=",r=n[1].split(/[&;]/g),a=r.length;a-- >0;)-1!==r[a].lastIndexOf(i,0)&&r.splice(a,1);return n[0]+(r.length>0?"?"+r.join("&"):"")}return e},urlAddParams:function(e,t){if("object"===o(t)&&null!==t)for(var n in e+="",e+=-1===e.indexOf("?")?"?":"",t)t.hasOwnProperty(n)&&(e+="&"+n+"="+t[n]);return e.replace("?&","?")},stringConnect:function(){for(var e=null,t="",n=arguments.length,i=new Array(n),r=0;r0&&(e=e[0]);var n="object"===o(e.$el)?$A(e.$el):$A(e);if(0!==n.length){var i=n[0];if("INPUT"!=i.tagName&&"TEXTAREA"!=i.tagName&&(n=0===n.find("input").length?n.find("textarea"):n.find("input")),0!==n.length&&("INPUT"==(i=n[0]).tagName||"TEXTAREA"==i.tagName)){var r=n.val(),a=i,s=a.selectionStart,l=a.selectionEnd;n.val("".concat(r.substring(0,s)).concat(t).concat(r.substring(l,r.length))),i.dispatchEvent(new Event("input")),setTimeout((function(){if(i.setSelectionRange){var e=r.substring(0,s).length+t.length;i.focus(),i.setSelectionRange(e,e)}}),10)}}}},iOSKeyboardFixer:function(){this.isIos()&&(document.body.scrollTop=document.body.scrollTop+1,document.body.scrollTop=document.body.scrollTop-1)},autoDevwid:function(t){var n=t||640;new function(){var t=this;t.width=n,t.fontSize=30,t.widthProportion=function(){var e=(document.body&&document.body.clientWidth||document.getElementsByTagName("html")[0].offsetWidth)/t.width;return e>1?1:e<.38?.38:e},t.changePage=function(){document.getElementsByTagName("html")[0].setAttribute("style","font-size:"+t.widthProportion()*t.fontSize+"px !important")},t.changePage(),e.addEventListener("resize",(function(){t.changePage()}),!1)};var i=$A(e).width()/n;return $A(".__auto").each((function(){"1"!==$A(this).attr("data-original")&&($A(this).attr("data-original-top",parseInt($A(this).css("top"))),$A(this).attr("data-original-right",parseInt($A(this).css("right"))),$A(this).attr("data-original-bottom",parseInt($A(this).css("bottom"))),$A(this).attr("data-original-left",parseInt($A(this).css("left"))),$A(this).attr("data-original-width",parseInt($A(this).css("width"))),$A(this).attr("data-original-height",parseInt($A(this).css("height"))),$A(this).attr("data-original-line-height",parseInt($A(this).css("line-height"))),$A(this).attr("data-original","1"));var e=parseInt($A(this).attr("data-original-top")),t=parseInt($A(this).attr("data-original-right")),n=parseInt($A(this).attr("data-original-bottom")),r=parseInt($A(this).attr("data-original-left")),a=parseInt($A(this).attr("data-original-width")),o=parseInt($A(this).attr("data-original-height")),s=parseInt($A(this).attr("data-original-line-height")),l={};e>0&&(l.top=e*i),t>0&&(l.right=t*i),n>0&&(l.bottom=n*i),r>0&&(l.left=r*i),a>0&&(l.width=a*i),o>0&&(l.height=o*i),s>0&&(l["line-height"]=s*i+"px"),$A(this).css(l)})),i},loadScript:function(t,n){var i=this;if(t=$A.originUrl(t),this.rightExists(t,".css"))this.loadCss(t,n);else if(!0!==this.__loadScript[t]){var r=document.createElement("script");r.type="text/javascript",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,i.__loadScript[t]=!0,"function"==typeof n&&n())}:r.onload=function(){i.__loadScript[t]=!0,"function"==typeof n&&n()},this.rightExists(t,".js")?r.src=t+"?hash="+e.systemInformation.version:r.src=t,document.body.appendChild(r)}else"function"==typeof n&&n()},loadScriptS:function(e,t){var n=this,i=0;this.loadScript(e[0],(function r(){++i0){for(var t="",i=0;i0&&r.push(u.join("&"))}else null===e[l]?r.push(a(l)+"="):"object"===o(e[l])?((i=n.slice()).push(l),""!==(u=t.serializeObject(e[l],i))&&r.push(u)):void 0!==e[l]&&""!==e[l]?r.push(a(l)+"="+s(e[l])):""===e[l]&&r.push(a(l))}return r.join("&")},globalAjaxOptions:{},ajaxSetup:function(e){e.type&&(e.method=e.type),t.each(e,(function(e,n){t.globalAjaxOptions[e]=n}))},_jsonpRequests:0,ihttp:function(i){var r={method:"GET",data:!1,async:!0,cache:!0,user:"",password:"",headers:{},xhrFields:{},statusCode:{},processData:!0,dataType:"text",contentType:"application/x-www-form-urlencoded",timeout:0},a=["beforeSend","error","complete","success","statusCode"];function o(e,n,r){var a=arguments;e&&t(document).trigger(e,n),r&&(r in t.globalAjaxOptions&&t.globalAjaxOptions[r](a[3],a[4],a[5],a[6]),i[r]&&i[r](a[3],a[4],a[5],a[6]))}i.type&&(i.method=i.type),t.each(t.globalAjaxOptions,(function(e,t){a.indexOf(e)<0&&(r[e]=t)})),t.each(r,(function(e,t){e in i||(i[e]=t)})),i.url||(i.url=e.location.toString());var s,l=i.url.indexOf("?")>=0?"&":"?",u=i.method.toUpperCase();"GET"!==u&&"HEAD"!==u&&"OPTIONS"!==u&&"DELETE"!==u||!i.data||(s="string"==typeof i.data?i.data.indexOf("?")>=0?i.data.split("?")[1]:i.data:t.serializeObject(i.data)).length&&(i.url+=l+s,"?"===l&&(l="&"));if("json"===i.dataType&&i.url.indexOf("callback=")>=0){var c,d="f7jsonp_"+Date.now()+t._jsonpRequests++,h=i.url.split("callback="),f=h[0]+"callback="+d;if(h[1].indexOf("&")>=0){var p=h[1].split("&").filter((function(e){return e.indexOf("=")>0})).join("&");p.length>0&&(f+="&"+p)}var m=document.createElement("script");return m.type="text/javascript",m.onerror=function(){clearTimeout(c),o(n,n,"error",null,"scripterror"),o("ajaxComplete ajax:complete",{scripterror:!0},"complete",null,"scripterror")},m.src=f,e[d]=function(t){clearTimeout(c),o(n,n,"success",t),m.parentNode.removeChild(m),m=null,delete e[d]},document.querySelector("head").appendChild(m),void(i.timeout>0&&(c=setTimeout((function(){m.parentNode.removeChild(m),m=null,o(n,n,"error",null,"timeout")}),i.timeout)))}"GET"!==u&&"HEAD"!==u&&"OPTIONS"!==u&&"DELETE"!==u||!1===i.cache&&(i.url+=l+"_nocache="+Date.now());var v=new XMLHttpRequest;v.requestUrl=i.url,v.requestParameters=i,v.open(u,i.url,i.async,i.user,i.password);var g,y=null;if(("POST"===u||"PUT"===u||"PATCH"===u)&&i.data)if(i.processData)if([ArrayBuffer,Blob,Document,FormData].indexOf(i.data.constructor)>=0)y=i.data;else{var b="---------------------------"+Date.now().toString(16);"multipart/form-data"===i.contentType?v.setRequestHeader("Content-Type","multipart/form-data; boundary="+b):v.setRequestHeader("Content-Type",i.contentType),y="";var _=t.serializeObject(i.data);if("multipart/form-data"===i.contentType){b="---------------------------"+Date.now().toString(16),_=_.split("&");for(var w=[],x=0;x<_.length;x++)w.push('Content-Disposition: form-data; name="'+_[x].split("=")[0]+'"\r\n\r\n'+_[x].split("=")[1]+"\r\n");y="--"+b+"\r\n"+w.join("--"+b+"\r\n")+"--"+b+"--\r\n"}else y=_}else y=i.data;return i.headers&&t.each(i.headers,(function(e,t){v.setRequestHeader(e,t)})),void 0===i.crossDomain&&(i.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(i.url)&&RegExp.$2!==e.location.host),i.crossDomain||v.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.xhrFields&&t.each(i.xhrFields,(function(e,t){v[e]=t})),v.onload=function(e){var n;if(g&&clearTimeout(g),v.status>=200&&v.status<300||0===v.status)if("json"===i.dataType)try{n=JSON.parse(v.responseText),o("ajaxSuccess ajax:success",{xhr:v},"success",n,v.status,v)}catch(e){console.error(e),o("ajaxError ajax:error",{xhr:v,parseerror:!0},"error",v,"parseerror")}else n="text"===v.responseType||""===v.responseType?v.responseText:v.response,o("ajaxSuccess ajax:success",{xhr:v},"success",n,v.status,v);else o("ajaxError ajax:error",{xhr:v},"error",v,v.status);i.statusCode&&(t.globalAjaxOptions.statusCode&&t.globalAjaxOptions.statusCode[v.status]&&t.globalAjaxOptions.statusCode[v.status](v),i.statusCode[v.status]&&i.statusCode[v.status](v)),o("ajaxComplete ajax:complete",{xhr:v},"complete",v,v.status)},v.onerror=function(e){g&&clearTimeout(g),o("ajaxError ajax:error",{xhr:v},"error",v,v.status),o("ajaxComplete ajax:complete",{xhr:v,error:!0},"complete",v,"error")},o("ajaxStart ajax:start",{xhr:v},"start",v),o(n,n,"beforeSend",v),i.timeout>0&&(v.onabort=function(){g&&clearTimeout(g)},g=setTimeout((function(){v.abort(),o("ajaxError ajax:error",{xhr:v,timeout:!0},"error",v,"timeout"),o("ajaxComplete ajax:complete",{xhr:v,timeout:!0},"complete",v,"timeout")}),i.timeout)),v.send(y),v}}),t.extend({ajaxc:function(e){return!!e&&(void 0!==e.url&&(void 0===e.data&&(e.data={}),void 0===e.cache&&(e.cache=!1),void 0===e.method&&(e.method="GET"),void 0===e.timeout&&(e.timeout=3e4),void 0===e.dataType&&(e.dataType="json"),void 0===e.before&&(e.before=function(){}),void 0===e.complete&&(e.complete=function(){}),void 0===e.after&&(e.after=function(){}),void 0===e.success&&(e.success=function(){}),void 0===e.error&&(e.error=function(){}),void 0===e.header&&(e.header={}),e.before(),void $A.ihttp({url:e.url,data:e.data,cache:e.cache,headers:e.header,method:e.method.toUpperCase(),contentType:"OPTIONS",crossDomain:!0,dataType:e.dataType,timeout:e.timeout,success:function(t,n,i){e.complete(),e.success(t,n,i),e.after(!0)},error:function(t,n){e.complete(),e.error(t,n),e.after(!1)}})))}}),t.extend({date2string:function(e,t){if(null===e)return e;if(void 0===t&&(t="Y-m-d H:i:s"),e instanceof Date)e=$A.formatDate(t,e);else if($A.isJson(e))for(var n in e)e.hasOwnProperty(n)&&(e[n]=$A.date2string(e[n],t));else $A.isArray(e)&&e.forEach((function(n,i){e[i]=$A.date2string(n,t)}));return e},getData:function(e){var t=arguments.length>1&&arguments[1]!==n&&arguments[1],i=new Date,r=i.getDay(),a=i.getDate(),o=i.getMonth(),s=i.getYear();s+=s<2e3?1900:0;var l=new Date;l.setDate(1),l.setMonth(l.getMonth()-1);var u=l.getMonth(),c=function(){var e=0;return o<3&&(e=0),28&&(e=9),e},d=function(e){var t=new Date(s,e,1);return(new Date(s,e+1,1)-t)/864e5},h=i.getTime();switch(e){case"今天":h=i;break;case"昨天":h=i-864e5;break;case"前天":h=i-1728e5;break;case"本周":h=new Date(s,o,a-r);break;case"本周结束":h=new Date(s,o,a+(6-r));break;case"上周":h=new Date(s,o,a-r-7);break;case"上周结束":h=new Date(s,o,a-r-1);break;case"本周2":h=new Date(s,o,a-r+1);break;case"本周结束2":h=new Date(s,o,a+(6-r)+1);break;case"上周2":h=new Date(s,o,a-r-7+1);break;case"上周结束2":h=new Date(s,o,a-r-1+1);break;case"本月":h=new Date(s,o,1);break;case"本月结束":h=new Date(s,o,d(o));break;case"上个月":h=new Date(s,u,1);break;case"上个月结束":h=new Date(s,u,d(u));break;case"本季度":h=new Date(s,c(),1);break;case"本季度结束":var f=c()+2;h=new Date(s,f,d(f))}return!0===t?h:$A.formatDate("Y-m-d",parseInt(h/1e3))},bytesToSize:function(e){if(0===e)return"0 B";var t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(1024));return void 0===t[n]?"0 B":$A.runNum(e/Math.pow(1024,n),2)+" "+t[n]},html2Escape:function(e){return e&&""!=e?e.replace(/[<>&"]/g,(function(e){return{"<":"<",">":">","&":"&",'"':"""}[e]})):""},sreachHighlight:function(e,t){return e&&""!=e?t&&""!=t?e=(e=(e=$A.html2Escape(e.replace(new RegExp(t,"g"),"[highlight]"+t+"[/highlight]"))).replace(/\[highlight\]/g,'')).replace(/\[\/highlight\]/g,""):$A.html2Escape(e):""}}),e.$A=t}(window,window.$=window.jQuery=n(19755))},92693:()=>{!function(e){var t=e.$A;t.extend({modalConfig:function(e){return void 0===e?e={content:"Undefined"}:"string"==typeof e&&(e={content:e}),e.title=$A.L(e.title||(void 0===e.render?"温馨提示":"")),e.content=$A.L(e.content||""),e.okText=$A.L(e.okText||"确定"),e.cancelText=$A.L(e.cancelText||"取消"),e},modalInput:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>0)setTimeout((function(){$A.modalInput(e)}),t);else{"string"==typeof e&&(e={title:e});var n="modalInput_"+$A.randomString(6);$A.Modal.confirm({render:function(t){return t("div",[t("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},$A.L(e.title)),t("Input",{props:{value:e.value,placeholder:$A.L(e.placeholder),elementId:n},on:{input:function(t){e.value=t}}})])},loading:!0,onOk:function(){"function"==typeof e.onOk?!0===e.onOk(e.value,(function(){$A.Modal.remove()}))&&$A.Modal.remove():$A.Modal.remove()}}),setTimeout((function(){document.getElementById(n)&&document.getElementById(n).focus()}))}},modalConfirm:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>0?setTimeout((function(){$A.modalConfirm(e)}),t):$A.Modal.confirm($A.modalConfig(e))},modalSuccess:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>0?setTimeout((function(){$A.modalSuccess(e)}),t):$A.Modal.success($A.modalConfig(e))},modalInfo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>0?setTimeout((function(){$A.modalInfo(e)}),t):$A.Modal.info($A.modalConfig(e))},modalWarning:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>0?setTimeout((function(){$A.modalWarning(e)}),t):$A.Modal.warning($A.modalConfig(e))},modalError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t>0?setTimeout((function(){$A.modalError(e)}),t):$A.Modal.error($A.modalConfig(e))},modalAlert:function(e){alert($A.L(e))},messageSuccess:function(e){$A.Message.success($A.L(e))},messageWarning:function(e){$A.Message.warning($A.L(e))},messageError:function(e){$A.Message.error($A.L(e))},noticeConfig:function(e){return void 0===e?e={desc:"Undefined"}:"string"==typeof e&&(e={desc:e}),e.title=$A.L(e.title||(void 0===e.render?"温馨提示":"")),e.desc=$A.L(e.desc||""),e},noticeSuccess:function(e){$A.Notice.success($A.noticeConfig(e))},noticeWarning:function(e){$A.Notice.warning($A.noticeConfig(e))},noticeError:function(e){"string"==typeof e&&(e={desc:e,duration:6}),$A.Notice.error($A.noticeConfig(e))}}),e.$A=t}(window)},31108:(e,t)=>{t.Z=[]},52945:(e,t,n)=>{e.exports={default:n(56981),__esModule:!0}},93516:(e,t,n)=>{e.exports={default:n(80025),__esModule:!0}},64275:(e,t,n)=>{e.exports={default:n(52392),__esModule:!0}},88239:(e,t,n)=>{"use strict";var i,r=n(52945),a=(i=r)&&i.__esModule?i:{default:i};t.Z=a.default||function(e){for(var t=1;t{"use strict";var i=o(n(64275)),r=o(n(93516)),a="function"==typeof r.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.Z="function"==typeof r.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":a(e)}},56981:(e,t,n)=>{n(72699),e.exports=n(34579).Object.assign},80025:(e,t,n)=>{n(46840),n(94058),n(8174),n(36461),e.exports=n(34579).Symbol},52392:(e,t,n)=>{n(91867),n(73871),e.exports=n(25103).f("iterator")},85663:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},79003:e=>{e.exports=function(){}},12159:(e,t,n)=>{var i=n(36727);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},57428:(e,t,n)=>{var i=n(7932),r=n(78728),a=n(16531);e.exports=function(e){return function(t,n,o){var s,l=i(t),u=r(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},32894:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},34579:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},19216:(e,t,n)=>{var i=n(85663);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},8333:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},89666:(e,t,n)=>{e.exports=!n(7929)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},97467:(e,t,n)=>{var i=n(36727),r=n(33938).document,a=i(r)&&i(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},73338:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},70337:(e,t,n)=>{var i=n(46162),r=n(48195),a=n(86274);e.exports=function(e){var t=i(e),n=r.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},83856:(e,t,n)=>{var i=n(33938),r=n(34579),a=n(19216),o=n(41818),s=n(27069),l=function(e,t,n){var u,c,d,h=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,v=e&l.B,g=e&l.W,y=f?r:r[t]||(r[t]={}),b=y.prototype,_=f?i:p?i[t]:(i[t]||{}).prototype;for(u in f&&(n=t),n)(c=!h&&_&&void 0!==_[u])&&s(y,u)||(d=c?_[u]:n[u],y[u]=f&&"function"!=typeof _[u]?n[u]:v&&c?a(d,i):g&&_[u]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[u]=d,e&l.R&&b&&!b[u]&&o(b,u,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},7929:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},33938:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},27069:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},41818:(e,t,n)=>{var i=n(4743),r=n(83101);e.exports=n(89666)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},54881:(e,t,n)=>{var i=n(33938).document;e.exports=i&&i.documentElement},33758:(e,t,n)=>{e.exports=!n(89666)&&!n(7929)((function(){return 7!=Object.defineProperty(n(97467)("div"),"a",{get:function(){return 7}}).a}))},50799:(e,t,n)=>{var i=n(32894);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},71421:(e,t,n)=>{var i=n(32894);e.exports=Array.isArray||function(e){return"Array"==i(e)}},36727:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},33945:(e,t,n)=>{"use strict";var i=n(98989),r=n(83101),a=n(25378),o={};n(41818)(o,n(22939)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(o,{next:r(1,n)}),a(e,t+" Iterator")}},45700:(e,t,n)=>{"use strict";var i=n(16227),r=n(83856),a=n(57470),o=n(41818),s=n(15449),l=n(33945),u=n(25378),c=n(95089),d=n(22939)("iterator"),h=!([].keys&&"next"in[].keys()),f="keys",p="values",m=function(){return this};e.exports=function(e,t,n,v,g,y,b){l(n,t,v);var _,w,x,C=function(e){if(!h&&e in $)return $[e];switch(e){case f:case p:return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",S=g==p,O=!1,$=e.prototype,T=$[d]||$["@@iterator"]||g&&$[g],D=T||C(g),E=g?S?C("entries"):D:void 0,M="Array"==t&&$.entries||T;if(M&&(x=c(M.call(new e)))!==Object.prototype&&x.next&&(u(x,k,!0),i||"function"==typeof x[d]||o(x,d,m)),S&&T&&T.name!==p&&(O=!0,D=function(){return T.call(this)}),i&&!b||!h&&!O&&$[d]||o($,d,D),s[t]=D,s[k]=m,g)if(_={values:S?D:C(p),keys:y?D:C(f),entries:E},b)for(w in _)w in $||a($,w,_[w]);else r(r.P+r.F*(h||O),t,_);return _}},85084:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},15449:e=>{e.exports={}},16227:e=>{e.exports=!0},77177:(e,t,n)=>{var i=n(65730)("meta"),r=n(36727),a=n(27069),o=n(4743).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(7929)((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,i,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[i].i},getWeak:function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[i].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!a(e,i)&&c(e),e}}},88082:(e,t,n)=>{"use strict";var i=n(89666),r=n(46162),a=n(48195),o=n(86274),s=n(66530),l=n(50799),u=Object.assign;e.exports=!u||n(7929)((function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=i}))?function(e,t){for(var n=s(e),u=arguments.length,c=1,d=a.f,h=o.f;u>c;)for(var f,p=l(arguments[c++]),m=d?r(p).concat(d(p)):r(p),v=m.length,g=0;v>g;)f=m[g++],i&&!h.call(p,f)||(n[f]=p[f]);return n}:u},98989:(e,t,n)=>{var i=n(12159),r=n(57856),a=n(73338),o=n(58989)("IE_PROTO"),s=function(){},l=function(){var e,t=n(97467)("iframe"),i=a.length;for(t.style.display="none",n(54881).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("
'},Dx=function(t,e){var n=t.editorManager.translate("Rich Text Area. Press ALT-0 for help."),r=function(t,e,n,r){var o=De.fromTag("iframe");return Kn(o,r),Kn(o,{id:t+"_ifr",frameBorder:"0",allowTransparency:"true",title:e}),Ss(o,"tox-edit-area__iframe"),o}(t.id,n,e.height,function(t){return t.getParam("iframe_attrs",{})}(t)).dom;r.onload=function(){r.onload=null,t.fire("load")};var o=function(t,e){if(document.domain!==window.location.hostname&&be.browser.isIE()){var n=ab("mce");t[n]=function(){kx(t)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return xx.setAttrib(e,"src",r),!0}return!1}(t,r);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=r,t.iframeHTML=Sx(t),xx.add(e.iframeContainer,r),o},Ex=us.DOM,Nx=function(t,e,n){var r=qy.get(n),o=qy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=xe.trim(n),r&&-1===xe.inArray(e,n)){if(xe.each(qy.dependencies(n),(function(n){Nx(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);t.plugins[n]=i,i.init&&(i.init(t,o),e.push(n))}catch(e){!function(t,e,n){var r=vs.translate(["Failed to initialize plugin: {0}",e]);Kf(t,"PluginLoadError",{message:r}),tb(r,n),Gy(t,r)}(t,n,e)}}},Ax=function(t){return t.replace(/^\-/,"")},Tx=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},Lx=function(t){var e=t.getElement();return t.inline?Tx(null):function(t){var e=Ex.create("div");return Ex.insertAfter(e,t),Tx(e)}(e)},Ox=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,d(lc(t))?function(t){return t.theme.renderUI()}(t):C(lc(t))?function(t){var e=t.getElement(),n=lc(t)(t,e);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:e.offsetHeight,n}(t):Lx(t)},$x=function(t){t.fire("ScriptsLoaded"),function(t){var e=xe.trim(Ju(t)),n=t.ui.registry.getAll().icons,r=Dt(Dt({},Ry.get("default").icons),Ry.get(e).icons);st(r,(function(e,r){gt(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=lc(t);if(d(e)){t.settings.theme=Ax(e);var n=Wy.get(e);t.theme=new n(t,Wy.urls[e]),t.theme.init&&t.theme.init(t,Wy.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];xe.each(pc(t).split(/[ ,]/),(function(n){Nx(t,e,Ax(n))}))}(t);var e=Ox(t);!function(t,e){var n={show:I.from(e.show).getOr(_),hide:I.from(e.hide).getOr(_),disable:I.from(e.disable).getOr(_),isDisabled:I.from(e.isDisabled).getOr(L),enable:function(){t.mode.isReadOnly()||I.from(e.enable).map(T)}};t.ui=Dt(Dt({},t.ui),n)}(t,I.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,rb(t),t.inline?kx(t):function(t,e){var n=Dx(t,e);e.editorContainer&&(xx.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=xx.isHidden(e.editorContainer)),t.getElement().style.display="none",xx.setAttrib(t.id,"aria-hidden","true"),n||kx(t)}(t,n)},Px=us.DOM,Rx=function(t){return"-"===t.charAt(0)},Ix=function(t,e){var n=ic(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===vs.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,_,void 0,(function(){!function(t,e,n){Zy(t,"LanguageLoadError",Jy("language",e,n))}(e,o,n)}))}},Bx=function(t,e,n){return I.from(e).filter((function(t){return t.length>0&&!Ry.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:I.some(e)}}))},Mx=function(t,e,n){var r=Bx(e,"default",n),o=function(t){return I.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:I.none()}}))}(e).orThunk((function(){return Bx(e,Ju(e),"")}));H(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r=1&&n<=7){var r=function(t){return xe.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return xe.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},Gx=function(t){var e=t.split(/\s*,\s*/);return V(e,(function(t){return-1===t.indexOf(" ")||Rt(t,'"')||Rt(t,"'")?t:"'"+t+"'"})).join(",")},Zx=function(t,e){var n=function(t){var e;return"string"!=typeof t?(e=xe.extend({paste:t.paste,data:{paste:t.paste}},t),{content:t.content,details:e}):{content:t,details:{}}}(e);!function(t,e,n){Nv(t).editor.insertContent(e,n)}(t,n.content,n.details)},Jx=xe.each,Qx=xe.map,tS=xe.inArray,eS=function(){function t(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return t.prototype.execCommand=function(t,e,n,r){var o,i=!1,a=this;if(!a.editor.removed){var s;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?(s=a.editor,Zd(s).each((function(t){return s.selection.setRng(t)}))):a.editor.focus(),(r=a.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n})).isDefaultPrevented())return!1;var u=t.toLowerCase();if(o=a.commands.exec[u])return o(u,e,n),a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(Jx(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),i=!0,!1})),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{i=a.editor.getDoc().execCommand(t,e,n)}catch(t){}return!!i&&(a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},t.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(t){}return!1}},t.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(t){}}},t.prototype.addCommands=function(t,e){void 0===e&&(e="exec");var n=this;Jx(t,(function(t,r){Jx(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},t.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,a){return e.call(n||r.editor,o,i,a)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(t){}return!1},t.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},t.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},t.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},t.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},t.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},t.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e?{value:e}:void 0),this.editor.nodeChanged()},t.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(t){var e=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":_,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(t){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");be.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),Jx("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;e.execNativeCommand(n);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(e.storeSelection(),t.dom.split(r,o),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,r)},FontName:function(e,n,r){!function(t,e){var n=Xx(t,e);t.formatter.toggle("fontname",{value:Gx(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:Xx(t,e)}),t.nodeChanged()}(t,r)},LineHeight:function(e,n,r){!function(t,e){t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()}(t,r)},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){Zx(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){Lk(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){t_(t,e)},mceRepaint:_,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"
")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){"string"==typeof r&&(r={href:r});var o=t.dom.getParent(t.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),Fn);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return yk(t,r),!0}});var n=function(e){return function(){var n=t.selection,r=n.isCollapsed()?[t.dom.getParent(n.getNode(),t.dom.isBlock)]:n.getSelectedBlocks(),o=Qx(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==tS(o,!0)}};e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return Zw(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return function(t){return Yx(t,(function(e){return Wx(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return Yx(t,(function(e){return qx(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return Yx(t,(function(e){var n=De.fromDom(t.getBody());return qh(e,(function(t){return tr(t,"line-height")}),D(Te,n)).getOrThunk((function(){var t=parseFloat(Jn(e,"line-height")),n=parseFloat(Jn(e,"font-size"));return String(t/n)}))})).getOr("")}(t)}),this)},t}(),nS="data-mce-contenteditable",rS=function(t,e,n){var r,o;Es(t,e)&&!1===n?(o=e,_s(r=t)?r.dom.classList.remove(o):xs(r,o),Ds(r)):n&&Ss(t,e)},oS=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},iS=function(t,e){t.dom.contentEditable=e?"true":"false"},aS=function(t,e){var n=De.fromDom(t.getBody());rS(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){I.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,iS(n,!1),H(As(n,'*[contenteditable="true"]'),(function(t){Wn(t,nS,"true"),iS(t,!1)}))):(t.readonly=!1,iS(n,!0),function(t){H(As(t,'*[data-mce-contenteditable="true"]'),(function(t){Gn(t,nS),iS(t,!0)}))}(n),oS(t,"StyleWithCSS",!1),oS(t,"enableInlineTableEditing",!1),oS(t,"enableObjectResizing",!1),lm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},sS=function(t){return t.readonly},uS=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){sS(t)&&H(e,(function(t){t.attr(nS,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(nS,(function(e){sS(t)&&H(e,(function(t){t.attr("contenteditable",t.attr(nS))}))})),t.serializer.addTempAttr(nS)},cS=function(t,e){if(function(t){return"click"===t.type}(e)&&!Yf.metaKeyPressed(e)){var n=De.fromDom(e.target);(function(t,e){return Wr(e,"a",(function(e){return Te(e,De.fromDom(t.getBody()))})).bind((function(t){return Xn(t,"href")}))})(t,n).each((function(n){if(e.preventDefault(),/^#/.test(n)){var r=t.dom.select(n+',[name="'+((Rt(o=n,i="#")?function(t,e){return t.substring(e)}(o,i.length):o)+'"]'));r.length&&t.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes");var o,i}))}},lS=xe.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),fS=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||L}return t.isNative=function(t){return!!lS[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=e||{};r.type=n,r.target||(r.target=this.scope),r.preventDefault||(r.preventDefault=function(){r.isDefaultPrevented=O},r.stopPropagation=function(){r.isPropagationStopped=O},r.stopImmediatePropagation=function(){r.isImmediatePropagationStopped=O},r.isDefaultPrevented=L,r.isPropagationStopped=L,r.isImmediatePropagationStopped=L),this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i"),DS);return o[o.length-1]=xe.extend(o[o.length-1],{func:n,scope:r||this.editor}),xe.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},t.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},t.prototype.isFunctionKey=function(t){return"keydown"===t.type&&t.keyCode>=112&&t.keyCode<=123},t.prototype.matchShortcut=function(t,e){return!!e&&(e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&(e.alt===t.altKey&&e.shift===t.shiftKey&&(!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0))))},t.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},t}(),NS=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},s=function(t,e){return function(n,r){return t[n.toLowerCase()]=Dt(Dt({},r),{type:e})}};return{addButton:s(t,"button"),addGroupToolbarButton:s(t,"grouptoolbarbutton"),addToggleButton:s(t,"togglebutton"),addMenuButton:s(t,"menubutton"),addSplitButton:s(t,"splitbutton"),addMenuItem:s(e,"menuitem"),addNestedMenuItem:s(e,"nestedmenuitem"),addToggleMenuItem:s(e,"togglemenuitem"),addAutocompleter:s(n,"autocompleter"),addContextMenu:s(o,"contextmenu"),addContextToolbar:s(i,"contexttoolbar"),addContextForm:s(i,"contextform"),addSidebar:s(a,"sidebar"),addIcon:function(t,e){return r[t.toLowerCase()]=e},getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}}();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},AS=xe.each,TS=xe.trim,LS="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),OS={ftp:21,http:80,https:443,mailto:25},$S=function(){function t(e,n){e=TS(e),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");if(0!==e.indexOf("/")||i||(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var a=this.settings.base_uri?this.settings.base_uri.path:new t(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+o.toAbsPath(a,e);else{var s=/([^#?]*)([#?]?.*)/.exec(e);e=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(a,s[1])+s[2]}}e=e.replace(/@@/g,"(mce_at)");var u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);AS(LS,(function(t,e){var n=u[e];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[t]=n})),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}return t.parseDataUri=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},t.getDocumentBaseUrl=function(t){var e;return e=0!==t.protocol.indexOf("http")&&"file:"!==t.protocol?t.href:t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},t.prototype.setPath=function(t){var e=/^(.*?)\/?(\w+)?$/.exec(t);this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},t.prototype.toRelative=function(e){var n;if("./"===e)return e;var r=new t(e,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},t.prototype.toAbsolute=function(e,n){var r=new t(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},t.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var e=OS[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},t.prototype.toRelPath=function(t,e){var n,r,o=0,i="",a=t.substring(0,t.lastIndexOf("/")).split("/"),s=e.split("/");if(a.length>=s.length)for(n=0,r=a.length;n=s.length||a[n]!==s[n]){o=n+1;break}if(a.length=a.length||a[n]!==s[n]){o=n+1;break}if(1===o)return e;for(n=0,r=a.length-(o-1);n=0;n--)0!==u[n].length&&"."!==u[n]&&(".."!==u[n]?o>0?o--:i.push(u[n]):o++);return 0!==(r=(n=s.length-o)<=0?Q(i).join("/"):s.slice(0,n).join("/")+"/"+Q(i).join("/")).indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},t.prototype.getURI=function(t){var e;return void 0===t&&(t=!1),this.source&&!t||(e="",t||(this.protocol?e+=this.protocol+"://":e+="//",this.userInfo&&(e+=this.userInfo+"@"),this.host&&(e+=this.host),this.port&&(e+=":"+this.port)),this.path&&(e+=this.path),this.query&&(e+="?"+this.query),this.anchor&&(e+="#"+this.anchor),this.source=e),this.source},t}(),PS=us.DOM,RS=xe.extend,IS=xe.each,BS=xe.resolve,MS=be.ie,jS=function(){function t(t,e,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,RS(this,yS),this.settings=Oy(this,t,this.documentBaseUrl,n.defaultSettings,e),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(ds.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),us.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),ys.languageLoad=this.settings.language_load,ys.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new $S(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new ES(this),this.editorCommands=new eS(this),this.settings.cache_suffix&&(be.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:NS(),styleSheetLoader:void 0,show:_,hide:_,enable:_,disable:_,isDisabled:L};var o=wS(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=es.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){Fx(this)},t.prototype.focus=function(t){dm(this,t)},t.prototype.hasFocus=function(){return cm(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?KS[0]:null),JS.focusedEditor===t&&(JS.focusedEditor=null),e.length!==KS.length},ZS="CSS1Compat"!==document.compatMode,JS=Dt(Dt({},mS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:es,majorVersion:"5",minorVersion:"8.1",releaseDate:"2021-05-20",editors:WS,i18n:vs,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=$S.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/"));var o,i=window.tinymce||window.tinyMCEPreInit;if(i)t=i.base||i.baseURL,r=i.suffix;else{for(var a=document.getElementsByTagName("script"),s=0;s0&&US(zS(n),(function(t){var n=FS.get(t);n?e.push(n):US(document.forms,(function(n){US(n.elements,(function(n){n.name===t&&(t="mce_editor_"+HS++,FS.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":US(FS.select("textarea"),(function(n){t.editor_deselector&&i(n,t.editor_deselector)||t.editor_selector&&!i(n,t.editor_selector)||e.push(n)}))}return e}(t)),t.types?US(t.types,(function(n){xe.each(e,(function(e){return!FS.is(e,n.selector)||(l(o(e),VS({},t,n),e),!1)}))})):(xe.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(GS(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=xe.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):US(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):tb("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,FS.bind(window,"ready",s),new Kr((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?KS.slice(0):d(t)?X(KS,(function(e){return e.id===t})).getOr(null):w(t)&&KS[t]?KS[t]:null},add:function(t){var e=this;return WS[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(WS[t.id]=t),WS.push(t),KS.push(t)),XS(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),uw||(uw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",uw))),t},createEditor:function(t,e){return this.add(new jS(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!d(t))return n=t,h(r.get(n.id))?null:(GS(n)&&r.fire("RemoveEditor",{editor:n}),0===KS.length&&window.removeEventListener("beforeunload",uw),n.remove(),XS(KS.length>0),n);US(FS.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=KS.length-1;e>=0;e--)r.remove(KS[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new jS(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,e,n)},triggerSave:function(){US(KS,(function(t){t.save()}))},addI18n:function(t,e){vs.add(t,e)},translate:function(t){return vs.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new $S(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new $S(this.baseURL)}});JS.setup();var QS,tD,eD,nD,rD=Math.min,oD=Math.max,iD=Math.round,aD=function(t,e,n){var r=e.x,o=e.y,i=t.w,a=t.h,s=e.w,u=e.h,c=(n||"").split("");return"b"===c[0]&&(o+=u),"r"===c[1]&&(r+=s),"c"===c[0]&&(o+=iD(u/2)),"c"===c[1]&&(r+=iD(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=iD(a/2)),"c"===c[4]&&(r-=iD(i/2)),sD(r,o,i,a)},sD=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},uD={inflate:function(t,e,n){return sD(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:aD,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(t,e){var n=oD(t.x,e.x),r=oD(t.y,e.y),o=rD(t.x+t.w,e.x+e.w),i=rD(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:sD(n,r,o-n,i-r)},clamp:function(t,e,n){var r=t.x,o=t.y,i=t.x+t.w,a=t.y+t.h,s=e.x+e.w,u=e.y+e.h,c=oD(0,e.x-r),l=oD(0,e.y-o),f=oD(0,i-s),d=oD(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=f,o-=d),sD(r,o,(i-=f)-r,(a-=d)-o)},create:sD,fromClientRect:function(t){return sD(t.left,t.top,t.width,t.height)}},cD=(QS={},tD={},{load:function(t,e){var n='Script at URL "'+e+'" failed to load',r='Script at URL "'+e+"\" did not call `tinymce.Resource.add('"+t+"', data)` within 1 second";if(void 0!==QS[t])return QS[t];var o=new Kr((function(o,i){var a=function(t,e,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(t){return function(){for(var e=[],n=0;n1e4?(t.success&&n<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,n>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):Zr.setTimeout(r,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",bD.fire("beforeInitialize",{settings:t}),(e=new XMLHttpRequest).overrideMimeType&&e.overrideMimeType(t.content_type),e.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(e.withCredentials=!0),t.content_type&&e.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&xe.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=bD.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();Zr.setTimeout(r,10)}}),CD=xe.extend,wD=function(){function t(t){this.settings=CD({},t),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(t){var e=t.error,n=t.success,r=CD(this.settings,t);r.success=function(t,o){void 0===(t=vD.parse(t))&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=vD.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",bD.send(r)},t}();try{var _D="__storage_test__";(mD=window.localStorage).setItem(_D,_D),mD.removeItem(_D)}catch(t){mD=function(){var t={},e=[],n={getItem:function(e){return t[e]||null},setItem:function(n,r){e.push(n),t[n]=String(r)},key:function(t){return e[t]},removeItem:function(n){e=e.filter((function(t){return t===n})),delete t[n]},clear:function(){e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:function(){return e.length},configurable:!1,enumerable:!1}),n}()}var kD={geom:{Rect:uD},util:{Promise:Kr,Delay:Zr,Tools:xe,VK:Yf,URI:$S,Class:dD,EventDispatcher:fS,Observable:mS,I18n:vs,XHR:bD,JSON:vD,JSONRequest:wD,JSONP:yD,LocalStorage:mD,Color:function(t){var e={},n=0,r=0,o=0,i=function(t){var i;return"object"==typeof t?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&function(t,e,i){if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=hD(0,pD(e,1)),i=hD(0,pD(i,1)),0!==e){var a=t/60,s=i*e,u=s*(1-Math.abs(a%2-1)),c=i-s;switch(Math.floor(a)){case 0:n=s,r=u,o=0;break;case 1:n=u,r=s,o=0;break;case 2:n=0,r=s,o=u;break;case 3:n=0,r=u,o=s;break;case 4:n=u,r=0,o=s;break;case 5:n=s,r=0,o=u;break;default:n=r=o=0}n=gD(255*(n+c)),r=gD(255*(r+c)),o=gD(255*(o+c))}else n=r=o=gD(255*i)}(t.h,t.s,t.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,e};return t&&i(t),e.toRgb=function(){return{r:n,g:r,b:o}},e.toHsv=function(){return function(t,e,n){var r,o;o=0;var i=pD(t/=255,pD(e/=255,n/=255)),a=hD(t,hD(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:gD(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:gD(100*r),v:gD(100*o)})}(n,r,o)},e.toHex=function(){var t=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},e.parse=i,e},ImageUploader:function(t){var e=ob(),n=cb(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?ub(t):void 0)}}}},dom:{EventUtils:Oi,Sizzle:ha,DomQuery:es,TreeWalker:to,TextSeeker:Hs,DOMUtils:us,ScriptLoader:ds,RangeUtils:fd,Serializer:uy,StyleSheetLoader:Jr,ControlSelection:Gf,BookmarkManager:Hf,Selection:jv,Event:Oi.Event},html:{Styles:ki,Entities:fi,Node:_m,Schema:wi,SaxParser:Nm,DomParser:ry,Writer:Rm,Serializer:Im},Env:be,AddOnManager:ys,Annotator:Vf,Formatter:vb,UndoManager:yb,EditorCommands:eS,WindowManager:Yy,NotificationManager:Hy,EditorObservable:yS,Shortcuts:ES,Editor:jS,FocusManager:Jd,EditorManager:JS,DOM:us.DOM,ScriptLoader:ds.ScriptLoader,PluginManager:qy,ThemeManager:Wy,IconManager:Ry,Resource:cD,trim:xe.trim,isArray:xe.isArray,is:xe.is,toArray:xe.toArray,makeMap:xe.makeMap,each:xe.each,map:xe.map,grep:xe.grep,inArray:xe.inArray,extend:xe.extend,create:xe.create,walk:xe.walk,createNS:xe.createNS,resolve:xe.resolve,explode:xe.explode,_addCacheSuffix:xe._addCacheSuffix,isOpera:be.opera,isWebKit:be.webkit,isIE:be.ie,isGecko:be.gecko,isMac:be.mac},xD=xe.extend(JS,kD);!function(t){window.tinymce=t,window.tinyMCE=t}(xD),function(e){try{t.exports=e}catch(t){}}(xD)}()},62232:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"DrawerOverlay",props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"}},data:function(){return{}},mounted:function(){document.addEventListener("keydown",this.escClose)},beforeDestroy:function(){document.removeEventListener("keydown",this.escClose)},computed:{bodyStyle:function(){var t=parseInt(this.size);return t="".concat(t,t<=100?"%":"px"),"right"==this.placement?{width:t,height:"100%"}:{width:"100%",height:t}}},methods:{mask:function(){this.maskClosable&&this.close()},close:function(){this.$emit("input",!this.value)},escClose:function(t){if(this.value&&this.escClosable&&27===t.keyCode){var e=!1;$A(".ivu-modal").each((function(t,n){return!(e=$(n).is(":visible"))})),!e&&this.close()}}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["drawer-overlay",t.placement,t.value?"overlay-visible":"overlay-hide"]},[n("div",{staticClass:"overlay-mask",on:{click:t.mask}}),t._v(" "),n("div",{staticClass:"overlay-body",style:t.bodyStyle},[n("div",{staticClass:"overlay-close"},[n("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.close.apply(null,arguments)}}},[n("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[n("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),t._v(" "),n("div",{staticClass:"overlay-content"},[t._t("default")],2)])])}),[],!1,null,null,null).exports},32467:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(20629);function o(t){return(o="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})(t)}function i(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 a(t){for(var e=1;e1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted:function(){var t=this;this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);var e=$A(this.$refs.browselistbox);e.scroll((function(){var n=e[0].scrollHeight;if(e[0].scrollTop+e.height()>=n&&t.browseListNext.length>0){var r=t.browseListNext;t.browseListNext=[],t.browsePictureFor(r)}}))},watch:{value:function(t){"string"!=typeof t?t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList):this.$emit("input",this.initItems(t))},browseVisible:function(){this.httpType="",this.httpValue=""}},computed:a(a({},(0,r.rn)(["userToken"])),{},{uploadHeaders:function(){return{fd:this.$store.state.method.getStorageString("userWsFd"),token:this.userToken}},uploadParams:function(){return Object.keys(this.otherParams).length>0?Object.assign(this.params,this.otherParams):this.params}}),methods:{handleCallback:function(t){"callback"===this.type&&(!0===t?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):"object"===o(t)&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems:function(t){"string"==typeof t&&(t=[{url:t}]);var e=[];return $A.each(t,(function(t,n){"string"==typeof n&&(n={url:n}),n.url&&(n.active=!0,n.status="finished",void 0===n.path&&(n.path=n.url),void 0===n.thumb&&(n.thumb=n.url),e.push(n))})),e},handleView:function(t){this.visible=!0,this.imgVisible=t.url},handleRemove:function(t){var e=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(e.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress:function(){this.$emit("update:uploadIng",this.uploadIng+1)},handleSuccess:function(t,e){this.$emit("update:uploadIng",this.uploadIng-1),1===t.ret?(e.url=t.data.url,e.path=t.data.path,e.thumb=t.data.thumb,this.handleCallback(e)):($A.noticeWarning({title:this.$L("上传失败"),desc:this.$L("文件 "+e.name+" 上传失败 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError:function(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError:function(t){$A.noticeWarning({title:this.$L("文件格式不正确"),desc:this.$L("文件 "+t.name+" 格式不正确,请上传 jpg、jpeg、gif、png 格式的图片。")})},handleMaxSize:function(t){$A.noticeWarning({title:this.$L("超出文件大小限制"),desc:this.$L("文件 "+t.name+" 太大,不能超过:"+$A.bytesToSize(1024*this.maxSize))})},handleBeforeUpload:function(){var t=this.uploadList.length{"use strict";n.d(e,{Z:()=>o});const r={name:"ScrollerY",props:{static:{type:Boolean,default:!1},autoBottom:{type:Boolean,default:!1},autoRecovery:{type:Boolean,default:!0},autoRecoveryAnimate:{type:Boolean,default:!1}},data:function(){return{scrollY:0,scrollDiff:0,autoInterval:null}},mounted:function(){this.openInterval(),this.$nextTick(this.initScroll)},activated:function(){this.openInterval(),this.recoveryScroll()},destroyed:function(){this.closeInterval()},deactivated:function(){this.closeInterval()},methods:{initScroll:function(){var t=this;this.autoToBottom();var e="function"==typeof this.$listeners["on-scroll"],n=$A(this.$refs.scrollerView);n.scroll((function(){var r=Math.round(n.innerHeight()),o=n.scrollTop(),i=t.$refs.scrollerView.scrollHeight;if(t.scrollY=o,e){var a="static",s="static";t.scrollDiff-o>50?(t.scrollDiff=o,a="down"):t.scrollDiff-o<-100&&(t.scrollDiff=o,a="up"),t.scrollDiff-o>1?(t.scrollDiff=o,s="down"):t.scrollDiff-o<-1&&(t.scrollDiff=o,s="up"),t.$emit("on-scroll",{scale:o/(i-r),scrollY:o,scrollE:i-r-o,direction:a,directionreal:s})}}))},recoveryScroll:function(){var t=this;this.autoRecovery&&(this.scrollY>0||this.autoBottom)&&this.$nextTick((function(){t.autoBottom?t.autoToBottom():t.scrollTo(t.scrollY,t.autoRecoveryAnimate)}))},openInterval:function(){this.autoToBottom(),this.autoInterval&&clearInterval(this.autoInterval),this.autoInterval=setInterval(this.autoToBottom,300)},closeInterval:function(){clearInterval(this.autoInterval),this.autoInterval=null},scrollTo:function(t,e){!1===e?$A(this.$refs.scrollerView).stop().scrollTop(t):$A(this.$refs.scrollerView).stop().animate({scrollTop:t})},autoToBottom:function(){if(this.autoBottom&&this.$refs.bottom)try{this.$refs.bottom.scrollIntoView(!1)}catch(t){scrollIntoView(this.$refs.bottom,{behavior:"instant",inline:"end"})}},scrollInfo:function(){var t=$A(this.$refs.scrollerView),e=Math.round(t.innerHeight()),n=t.scrollTop(),r=this.$refs.scrollerView.scrollHeight;return this.scrollY=n,{scale:n/(r-e),scrollY:n,scrollE:r-e-n}}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"scrollerView",staticClass:"app-scroller-y",class:[t.static?"static":""]},[t._t("default"),t._v(" "),n("div",{ref:"bottom",staticClass:"app-scroller-bottom"})],2)}),[],!1,null,null,null).exports},59501:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});var r=n(47575),o=n.n(r),i=n(32467),a=n(20629);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})(t)}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){for(var e=1;e')},editorImage:function(t){for(var e=0;e').concat(t.data.name," (").concat($A.bytesToSize(1024*t.data.size),")")):$A.noticeWarning({title:this.$L("上传失败"),desc:this.$L("文件 "+e.name+" 上传失败,"+t.msg)})},handleError:function(){this.uploadIng--},handleFormatError:function(t){$A.noticeWarning({title:this.$L("文件格式不正确"),desc:this.$L("文件 "+t.name+" 格式不正确,仅支持上传:"+this.uploadFormat.join(","))})},handleMaxSize:function(t){$A.noticeWarning({title:this.$L("超出文件大小限制"),desc:this.$L("文件 "+t.name+" 太大,不能超过:"+$A.bytesToSize(1024*this.maxSize))})},handleBeforeUpload:function(){return!0}}};const d=(0,n(51900).Z)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"teditor-wrapper"},[n("input",{ref:"input",staticClass:"teditor-bginput"}),t._v(" "),n("div",{staticClass:"teditor-box",class:[!t.inline&&t.spinShow?"teditor-loadstyle":"teditor-loadedstyle"]},[t.inline?[n("div",{ref:"myTextarea",attrs:{id:t.id},domProps:{innerHTML:t._s(t.content)}}),t._v(" "),t.spinShow?n("Icon",{staticClass:"icon-loading icon-inline",attrs:{type:"ios-loading",size:18}}):t._e()]:[n("textarea",{ref:"myTextarea",attrs:{id:t.id}},[t._v(t._s(t.content))]),t._v(" "),t.spinShow?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading",size:18}}),t._v(" "),n("div",[t._v(t._s(t.$L("加载组件中...")))])],1):t._e()],t._v(" "),n("ImgUpload",{ref:"myUpload",staticClass:"upload-control",attrs:{type:"callback",uploadIng:t.uploadIng,num:"50"},on:{"update:uploadIng":function(e){t.uploadIng=e},"update:upload-ing":function(e){t.uploadIng=e},"on-callback":t.editorImage}}),t._v(" "),n("Upload",{ref:"fileUpload",staticClass:"upload-control",attrs:{name:"files",action:t.actionUrl,headers:t.headers,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-error":t.handleError,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})],2),t._v(" "),t.uploadIng>0?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),n("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e(),t._v(" "),n("Modal",{staticClass:"teditor-transfer",attrs:{"footer-hide":"",fullscreen:"",transfer:""},on:{"on-visible-change":t.transferChange},model:{value:t.transfer,callback:function(e){t.transfer=e},expression:"transfer"}},[n("div",{attrs:{slot:"close"},slot:"close"},[n("Button",{attrs:{type:"primary",size:"small"}},[t._v(t._s(t.$L("完成")))])],1),t._v(" "),n("div",{staticClass:"teditor-transfer-body"},[n("textarea",{attrs:{id:"T_"+t.id}},[t._v(t._s(t.content))])]),t._v(" "),t.uploadIng>0?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),n("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e()],1)],1)}),[],!1,null,null,null).exports},83893:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:function(){return[]}},disabledChoice:{type:Array,default:function(){return[]}},placeholder:{default:""},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0}},data:function(){return{ready:!1,initialized:!1,loading:!1,openLoad:!1,values:[],list:[]}},mounted:function(){var t=this;$A.isArray(this.value)?this.values=$A.cloneJSON(this.value):this.$emit("input",this.value?[this.value]:[]),this.$nextTick((function(){t.ready=!0}))},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.values;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:function(t){this.values=t},values:function(t){this.$emit("input",t)}},methods:{openChange:function(t){t&&!this.openLoad&&(this.openLoad=!0,(this.list.length==this.values.length||this.list.length<=1)&&this.$nextTick(this.searchUser))},setDefaultOptions:function(t){var e=this,n=[];t.forEach((function(t){var r=t.value,o=t.label;e.list.push({userid:r,nickname:o}),n.push(r)})),this.$store.dispatch("getUserBasic",{userid:n,complete:function(){e.initialized=!0},success:function(n){var r=t.find((function(t){return t.value==n.userid}));r&&(e.$set(r,"label",n.nickname),e.$set(r,"avatar",n.userimg)),e.list.some((function(t,r){t.userid==n.userid&&e.$set(e.list,r,Object.assign(t,n))}))}})},searchUser:function(t){var e=this;""!==t?(this.loading=!0,this.$store.dispatch("call",{url:"users/search",data:{keys:{key:t||"",project_id:this.projectId,no_project_id:this.noProjectId},take:30}}).then((function(t){var n=t.data;e.loading=!1,e.list=n})).catch((function(t){var n=t.msg;e.loading=!1,e.list=[],$A.messageWarning(n)}))):this.list=[]},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready?n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{attrs:{transfer:t.transfer,"remote-method":t.searchUser,placeholder:t.placeholder,loading:t.loading,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,multipleMax:t.multipleMax,multipleUncancelable:t.uncancelable,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-open-change":t.openChange,"on-set-default-options":t.setDefaultOptions},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}},[t.multipleMax?n("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择"+t.multipleMax+"个")))]):t._e(),t._v(" "),t._l(t.list,(function(e,r){return n("Option",{key:r,attrs:{value:e.userid,label:e.nickname,avatar:e.userimg,disabled:t.isDisabled(e.userid)}},[n("div",{staticClass:"user-input-option"},[n("div",{staticClass:"user-input-avatar"},[n("EAvatar",{staticClass:"avatar",attrs:{src:e.userimg}})],1),t._v(" "),n("div",{staticClass:"user-input-nickname"},[t._v(t._s(e.nickname))]),t._v(" "),n("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(e.userid))])])])}))],2),t._v(" "),t.initialized?t._e():n("div",{staticClass:"common-user-loading"},[n("Loading")],1)],1):t._e()}),[],!1,null,null,null).exports},53107:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(20629),o=n(59501),i=n(26575),a=n(83893);function s(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 u(t){for(var e=1;e-1&&this.taskFiles.splice(i,1),1===n?this.taskFiles.push(r):(this.$refs.upload.fileList.pop(),$A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+o}))},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};var f=n(51900);const d=(0,f.Z)(l,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var m=n(3141);function p(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 h(t){for(var e=1;e0&&!this.$store.state.windowMax768},scrollerStyle:function(){var t=this.innerHeight,e=this.hasOpenDialog;return t&&e?{maxHeight:t-(t>900?200:70)-66-30+"px"}:{}},dialogStyle:function(){var t=this.innerHeight,e=this.hasOpenDialog;return t&&e?{minHeight:t-(t>900?200:70)-48+"px"}:{}},expiresFormat:function(){var t=this.nowTime;return function(e){var n=Math.round($A.Date(e).getTime()/1e3)-t;return n<345600&&n>0?this.formatSeconds(n):n<=0?"-"+this.formatSeconds(-1*n):this.formatTime(e)}},cutTime:function(){var t=this.nowTime,e=this.taskDetail,n="",r=Math.round($A.Date(e.start_at).getTime()/1e3);r>t&&(n=$A.formatDate("Y/m/d H:i",r)+" ~ ");var o=Math.round($A.Date(e.end_at).getTime()/1e3);return n+=$A.formatDate("Y/m/d H:i",o)},getOwner:function(){var t=this.taskDetail;return $A.isArray(t.task_user)?t.task_user.filter((function(t){return 1===t.owner})).sort((function(t,e){return t.id-e.id})):[]},getAssist:function(){var t=this.taskDetail;return $A.isArray(t.task_user)?t.task_user.filter((function(t){return 1!==t.owner})).sort((function(t,e){return t.id-e.id})):[]},menuList:function(){var t=this.taskDetail,e=[];return t.p_name||e.push({command:"priority",icon:"",name:"优先级"}),$A.isArray(t.task_user)&&t.task_user.find((function(t){return 1!==t.owner}))||e.push({command:"assist",icon:"",name:"协助人员"}),t.end_at||e.push({command:"times",icon:"",name:"截止时间"}),0==this.fileList.length&&e.push({command:"file",icon:"",name:"附件"}),0==this.subList.length&&e.push({command:"subtask",icon:"",name:"子任务"}),e}}),watch:{openTask:{handler:function(t){this.taskDetail=$A.cloneJSON(t)},immediate:!0,deep:!0},taskId:function(t){var e=this;t>0?this.$nextTick((function(){e.loadEditor=!0})):(this.timeOpen=!1,this.timeForce=!1,this.assistForce=!1,this.addsubForce=!1,this.$refs.owner&&this.$refs.owner.handleClose(),this.$refs.assist&&this.$refs.assist.handleClose())}},methods:{initLanguage:function(){var t=function(t){return $A.Date($A.formatDate("Y-m-d 23:59:29",Math.round(t/1e3)))};this.timeOptions={shortcuts:[{text:this.$L("今天"),value:function(){return[new Date,t((new Date).getTime())]}},{text:this.$L("明天"),value:function(){var e=new Date;return e.setDate(e.getDate()+1),[new Date,t(e.getTime())]}},{text:this.$L("本周"),value:function(){return[$A.getData("今天",!0),t($A.getData("本周结束2",!0))]}},{text:this.$L("本月"),value:function(){return[$A.getData("今天",!0),t($A.getData("本月结束",!0))]}},{text:this.$L("3天"),value:function(){var e=new Date;return e.setDate(e.getDate()+3),[new Date,t(e.getTime())]}},{text:this.$L("5天"),value:function(){var e=new Date;return e.setDate(e.getDate()+5),[new Date,t(e.getTime())]}},{text:this.$L("7天"),value:function(){var e=new Date;return e.setDate(e.getDate()+7),[new Date,t(e.getTime())]}}]}},innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},formatTime:function(t){var e=Math.round($A.Date(t).getTime()/1e3);return($A.formatDate("Ymd")===$A.formatDate("Ymd",e)?$A.formatDate("H:i",e):$A.formatDate("Y")===$A.formatDate("Y",e)?$A.formatDate("m-d",e):$A.formatDate("Y-m-d",e))||""},formatBit:function(t){return(t=+t)>9?t:"0"+t},formatSeconds:function(t){var e,n=Math.floor(t/86400),r=Math.floor(t%86400/3600),o=Math.floor(t%86400%3600/60),i=Math.floor(t%86400%3600%60);return n>0?e=r>0?n+"d,"+this.formatBit(r)+"h":o>0?n+"d,"+this.formatBit(o)+"min":i>0?n+"d,"+this.formatBit(i)+"s":n+"d":r>0?e=this.formatBit(r)+":"+this.formatBit(o)+":"+this.formatBit(i):o>0?e=this.formatBit(o)+":"+this.formatBit(i):i>0&&(e=this.formatBit(i)+"s"),e},onNameKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.updateData("name")}},dropTask:function(t){switch(t){case"complete":this.updateData("complete");break;case"uncomplete":this.updateData("uncomplete");break;case"times":this.openTime();break;case"archived":case"remove":this.archivedOrRemoveTask(t)}},updateData:function(t,e){var n=this;switch(t){case"complete":this.$set(this.taskDetail,"complete_at",$A.formatDate()),t="complete_at";break;case"uncomplete":this.$set(this.taskDetail,"complete_at",!1),t="complete_at";break;case"priority":this.$set(this.taskDetail,"p_level",e.priority),this.$set(this.taskDetail,"p_name",e.name),this.$set(this.taskDetail,"p_color",e.color),t=["p_level","p_name","p_color"];break;case"times":this.$set(this.taskDetail,"times",[e.start_at,e.end_at]);break;case"content":if(this.$refs.desc.getContent()==this.taskContent)return;this.$set(this.taskDetail,"content",this.$refs.desc.getContent())}var r={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach((function(t){var e=n.taskDetail[t],o=n.openTask[t];$A.jsonStringify(e)!=$A.jsonStringify(o)&&(r[t]=e)})),Object.keys(r).length<=1||this.$store.dispatch("taskUpdate",r).then((function(t){var e=t.msg;$A.messageSuccess(e)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},archivedOrRemoveTask:function(t){var e=this,n="remove"==t?"removeTask":"archivedTask",r="remove"==t?"删除":"归档",o=this.taskDetail.parent_id>0?"子任务":"任务";$A.modalConfirm({title:r+o,content:"你确定要"+r+o+"【"+this.taskDetail.name+"】吗?",loading:!0,onOk:function(){!0!==e.taskDetail.loading?(e.$set(e.taskDetail,"loading",!0),e.$store.dispatch(n,e.taskDetail.id).then((function(t){var n=t.msg;$A.messageSuccess(n),e.$Modal.remove()})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))):e.$Modal.remove()}})},openOwner:function(){var t=this.getOwner.map((function(t){return t.userid}));this.$set(this.taskDetail,"owner_userid",t),this.$set(this.ownerData,"owner_userid",t),this.ownerShow=!0},onOwner:function(t){var e=this;if(!0===t&&0===this.getOwner.length&&(this.ownerData.owner_userid=[this.userId]),$A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid)){var n=this.ownerData.owner_userid;0==$A.count(n)&&(n=""),this.ownerLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,owner:n}).then((function(t){var n=t.msg;$A.messageSuccess(n),e.ownerLoad--,e.ownerShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id)})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,e.ownerShow=!1}))}},openAssist:function(){var t=this.getAssist.map((function(t){return t.userid}));this.$set(this.taskDetail,"assist_userid",t),this.$set(this.assistData,"assist_userid",t),this.$set(this.assistData,"disabled",this.getOwner.map((function(t){return t.userid}))),this.assistShow=!0},onAssist:function(){var t=this;if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid)){var e=this.assistData.assist_userid;0===e.length&&(e=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:e}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.assistLoad--,t.assistShow=!1,t.$store.dispatch("getTaskOne",t.taskDetail.id)})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--,t.assistShow=!1}))}},openTime:function(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange:function(t){t||(this.timeOpen=!1)},timeClear:function(){var t=this;$A.modalConfirm({content:"你确定要取消任务时间吗?",cancelText:"不是",onOk:function(){t.updateData("times",{start_at:!1,end_at:!1}),t.timeOpen=!1}})},timeOk:function(){var t=$A.date2string(this.timeValue,"Y-m-d H:i");t[0]&&t[1]&&$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(t[1]=t[1].replace("00:00","23:59")),this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen:function(){var t=this;this.addsubShow=!0,this.$nextTick((function(){t.$refs.addsub.focus()}))},addsubChackClose:function(){""==this.addsubName&&(this.addsubShow=!1)},addsubKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAddsub()}},onAddsub:function(){var t=this;""!=this.addsubName?(this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addsubLoad--,t.addsubName=""})).catch((function(e){var n=e.msg;$A.modalError(n),t.addsubLoad--}))):$A.messageSuccess("任务描述不能为空")},setNavActive:function(t){"log"==t&&this.navActive==t&&this.$refs.log.getLists(!0),this.navActive=t},dropAdd:function(t){var e=this;switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("未设置")),this.$nextTick((function(){e.$refs.priority.show()}));break;case"assist":this.assistForce=!0,this.openAssist(),this.$nextTick((function(){e.$refs.assist.handleClick()}));break;case"times":this.timeForce=!0,this.$nextTick((function(){e.openTime()}));break;case"file":this.$refs.upload.handleClick();break;case"subtask":this.addsubForce=!0,this.$nextTick((function(){e.addsubOpen()}))}},msgKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.msgDialog()}},msgDialog:function(){var t=this;this.msgText&&this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id),t.$nextTick((function(){t.$store.state.windowMax768?(t.goForward({path:"/manage/messenger",query:{sendmsg:t.msgText}}),t.$store.state.method.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.$refs.dialog.sendMsg(t.msgText),t.msgText=""}))})).catch((function(t){var e=t.msg;$A.modalError(e)}))},openSend:function(){var t=this;this.sendLoad||(this.sendLoad=!0,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(e){var n=e.data;t.sendLoad=!1,t.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id),t.$nextTick((function(){t.goForward({path:"/manage/messenger",query:{sendmsg:t.msgText}}),t.$store.state.method.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)}))})).catch((function(e){var n=e.msg;t.sendLoad=!1,$A.modalError(n)})))},deleteFile:function(t){var e=this;this.$set(t,"_deling",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch((function(t){var n=t.msg;$A.modalError(n),e.$store.dispatch("getTaskFiles",e.taskDetail.id)}))}}};const y=(0,f.Z)(v,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.taskDetail.parent_id>0?n("li",[n("div",{staticClass:"subtask-icon"},[!0===t.taskDetail.loading?n("div",{staticClass:"loading"},[n("Loading")],1):n("EDropdown",{attrs:{trigger:"click",placement:"bottom",size:"small"},on:{command:t.dropTask}},[n("div",[t.taskDetail.complete_at?n("Icon",{staticClass:"completed",attrs:{type:"md-checkmark-circle"}}):n("Icon",{attrs:{type:"md-radio-button-off"}})],1),t._v(" "),n("EDropdownMenu",{staticClass:"project-list-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[t.taskDetail.complete_at?n("EDropdownItem",{attrs:{command:"uncomplete"}},[n("div",{staticClass:"item red"},[n("Icon",{attrs:{type:"md-checkmark-circle-outline"}}),t._v(t._s(t.$L("标记未完成"))+"\n ")],1)]):n("EDropdownItem",{attrs:{command:"complete"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-radio-button-off"}}),t._v(t._s(t.$L("完成"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"times"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-time"}}),t._v(t._s(t.$L("时间"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],1)],1)],1),t._v(" "),n("div",{staticClass:"subtask-name"},[n("Input",{attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateData("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(e){t.$set(t.taskDetail,"name",e)},expression:"taskDetail.name"}})],1),t._v(" "),n("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy-MM-dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}},[n("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v("\n "+t._s(t.taskDetail.end_at?t.expiresFormat(t.taskDetail.end_at):" ")+"\n ")])]),t._v(" "),n("Poptip",{ref:"owner",staticClass:"subtask-avatar",attrs:{title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-popper-hide":function(e){t.ownerShow=!1},"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.ownerShow?n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人")},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),t.getOwner.length>0?t._l(t.getOwner,(function(t){return n("UserAvatar",{key:t.userid,attrs:{userid:t.userid,size:20,"tooltip-disabled":""}})})):n("div",[t._v("--")])],2)],1):n("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at}},[n("div",{staticClass:"task-info"},[n("div",{staticClass:"head"},[t.taskDetail.complete_at?n("Icon",{staticClass:"icon completed",attrs:{type:"md-checkmark-circle"},on:{click:function(e){return t.updateData("uncomplete")}}}):n("Icon",{staticClass:"icon",attrs:{type:"md-radio-button-off"},on:{click:function(e){return t.updateData("complete")}}}),t._v(" "),n("div",{staticClass:"nav"},[t.projectName?n("p",[n("span",[t._v(t._s(t.projectName))])]):t._e(),t._v(" "),t.columnName?n("p",[n("span",[t._v(t._s(t.columnName))])]):t._e(),t._v(" "),t.taskDetail.id?n("p",[n("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),t._v(" "),0===t.getOwner.length?n("Poptip",{ref:"owner",staticClass:"pick",attrs:{confirm:"",title:t.$L("你确认领取任务吗?"),placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.onOwner(!0)}}},[n("Button",{attrs:{type:"primary"}},[t._v(t._s(t.$L("我要领取任务")))])],1):t._e(),t._v(" "),n("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropTask}},[n("Icon",{staticClass:"menu",attrs:{type:"ios-more"}}),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t.taskDetail.complete_at?n("EDropdownItem",{attrs:{command:"uncomplete"}},[n("div",{staticClass:"item red"},[n("Icon",{attrs:{type:"md-checkmark-circle-outline"}}),t._v(t._s(t.$L("标记未完成"))+"\n ")],1)]):n("EDropdownItem",{attrs:{command:"complete"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-radio-button-off"}}),t._v(t._s(t.$L("完成"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"ios-filing"}}),t._v(t._s(t.$L("归档"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],1)],1)],1),t._v(" "),n("div",{staticClass:"scroller overlay-y",style:t.scrollerStyle},[n("div",{staticClass:"title"},[n("Input",{attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateData("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(e){t.$set(t.taskDetail,"name",e)},expression:"taskDetail.name"}})],1),t._v(" "),n("div",{staticClass:"desc"},[t.loadEditor?n("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("详细描述..."),inline:""},on:{"on-blur":function(e){return t.updateData("content")}}}):t._e()],1),t._v(" "),n("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[t.taskDetail.p_name?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("优先级"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(e){return t.updateData("priority",e)}}},[n("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,(function(e,r){return n("EDropdownItem",{key:r,attrs:{command:e}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==e.name?"":"")}}),t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1)])]):t._e(),t._v(" "),t.getOwner.length>0?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("负责人"))+"\n ")]),t._v(" "),n("Poptip",{ref:"owner",staticClass:"item-content user",attrs:{title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-popper-hide":function(e){t.ownerShow=!1},"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.ownerShow?n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人")},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),n("div",{staticClass:"user-list"},t._l(t.getOwner,(function(t){return n("UserAvatar",{key:t.userid,attrs:{userid:t.userid,size:28,"tooltip-disabled":""}})})),1)])],1):t._e(),t._v(" "),t.getAssist.length>0||t.assistForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("协助人员"))+"\n ")]),t._v(" "),n("Poptip",{ref:"assist",staticClass:"item-content user",attrs:{title:t.$L(t.getAssist.length>0?"修改协助人员":"添加协助人员"),width:280,placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-popper-hide":function(e){t.assistShow=!1},"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.assistShow?n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员")},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.assist.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),t.getAssist.length>0?n("div",{staticClass:"user-list"},t._l(t.getAssist,(function(t){return n("UserAvatar",{key:t.userid,attrs:{userid:t.userid,size:28}})})),1):n("div",[t._v("--")])])],1):t._e(),t._v(" "),t.taskDetail.end_at||t.timeForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("截止时间"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("DatePicker",{attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy-MM-dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}},[n("div",{staticClass:"picker-time"},[n("div",{staticClass:"time",on:{click:t.openTime}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),t._v(" "),!t.taskDetail.complete_at&&t.taskDetail.today?n("Tag",{attrs:{color:"blue"}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t._v(" "),!t.taskDetail.complete_at&&t.taskDetail.overdue?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()],1)])],1)])]):t._e(),t._v(" "),t.fileList.length>0?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("附件"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content file"},t._l(t.fileList,(function(e){return n("li",[e.id?n("img",{staticClass:"file-ext",attrs:{src:e.thumb}}):n("Loading",{staticClass:"file-load"}),t._v(" "),n("a",{staticClass:"file-name",attrs:{href:e.path||"javascript:;",target:"_blank"}},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(e.size)))]),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._deling,callback:function(n){t.$set(e,"_deling",n)},expression:"file._deling"}},[n("div",{staticClass:"task-detail-delete-file-popover"},[n("p",[t._v(t._s(t.$L("你确定要删除这个文件吗?")))]),t._v(" "),n("div",{staticClass:"buttons"},[n("Button",{attrs:{size:"small",type:"text"},on:{click:function(t){e._deling=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(n){return t.deleteFile(e)}}},[t._v(t._s(t.$L("确定")))])],1)]),t._v(" "),n("i",{class:["taskfont",e._deling?"deling":""],attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)})),0),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("div",{staticClass:"add-button",on:{click:function(e){return t.$refs.upload.handleClick()}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加附件"))+"\n ")])])])]):t._e(),t._v(" "),t.subList.length>0||t.addsubForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("子任务"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content subtask"},t._l(t.subList,(function(t,e){return n("TaskDetail",{key:e,attrs:{"open-task":t}})})),1),t._v(" "),n("ul",{class:["item-content",0===t.subList.length?"nosub":""]},[n("li",[t.addsubShow?n("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ 输入子任务,回车添加子任务"),icon:t.addsubLoad>0?"ios-loading":""},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(e){t.addsubName=e},expression:"addsubName"}}):n("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加子任务"))+"\n ")])],1)])]):t._e()],1),t._v(" "),t.menuList.length>0?n("div",{staticClass:"add"},[n("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[n("div",{staticClass:"add-button"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("添加"))+"\n "),t._l(t.menuList,(function(e){return n("em",[t._v(t._s(t.$L(e.name)))])}))],2),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,(function(e,r){return n("EDropdownItem",{key:r,attrs:{command:e.command}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(e.icon)}}),t._v(t._s(t.$L(e.name))+"\n ")])])})),1)],1)],1):t._e()],1),t._v(" "),n("TaskUpload",{ref:"upload",staticClass:"upload"})],1),t._v(" "),n("div",{staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?n("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[n("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[n("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),n("div",{staticClass:"nav"},[n("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){return t.setNavActive("dialog")}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),n("p",{class:{active:"log"==t.navActive},on:{click:function(e){return t.setNavActive("log")}}},[t._v(t._s(t.$L("动态")))])])],1)]):t._e(),t._v(" "),"log"==t.navActive?n("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id}}):t._e()]:n("div",[n("div",{staticClass:"head"},[n("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),n("div",{staticClass:"nav"},[n("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){return t.setNavActive("dialog")}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),n("p",{class:{active:"log"==t.navActive},on:{click:function(e){return t.setNavActive("log")}}},[t._v(t._s(t.$L("动态")))])])],1),t._v(" "),"log"==t.navActive?n("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id}}):n("div",{staticClass:"no-dialog"},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("Input",{staticClass:"dialog-input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.openSend}},[t.sendLoad?n("Loading"):n("Icon",{attrs:{type:"md-send"}})],1)],1)])],1)],2)])}),[],!1,null,null,null).exports;const b={name:"ProjectArchived",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},methods:{initLanguage:function(){var t=this;this.columns=[{title:this.$L("ID"),key:"id"},{title:this.$L("项目名称"),key:"name",minWidth:200,render:function(t,e){return t("AutoTip",e.row.name)}},{title:this.$L("归档时间"),key:"archived_at",width:168},{title:this.$L("归档会员"),key:"archived_userid",minWidth:80,render:function(t,e){return t("UserAvatar",{props:{userid:e.row.archived_userid,size:24,showName:!0}})}},{title:this.$L("负责人"),minWidth:80,render:function(t,e){return t("UserAvatar",{props:{showName:!0,size:22,userid:e.row.owner_userid}})}},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){var r=e("Poptip",{props:{title:t.$L("你确定要还原归档吗?"),confirm:!0,transfer:!0,placement:"left"},style:{fontSize:"13px",cursor:"pointer",color:"#8bcf70"},on:{"on-ok":function(){t.recovery(n.row)}}},[e("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},t.$L("还原"))]);return e("TableAction",{props:{column:n.column}},[r])}}]},getLists:function(){var t=this;this.loadIng++,this.$store.dispatch("call",{url:"project/lists",data:{archived:"yes",page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),20)}}).then((function(e){var n=e.data;t.loadIng--,t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.loadIng--,t.noText="数据加载失败"}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},recovery:function(t){var e=this;this.list=this.list.filter((function(e){return e.id!=t.id})),this.loadIng++,this.$store.dispatch("call",{url:"project/archived",data:{project_id:t.id,type:"recovery"}}).then((function(){e.loadIng--,e.getLists(),e.$store.dispatch("getProjectOne",t.id)})).catch((function(t){var n=t.msg;$A.modalError(n),e.loadIng--,e.getLists()}))}}};const C=(0,f.Z)(b,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-archived"},[n("div",{staticClass:"archived-title"},[t._v(t._s(t.$L("归档的项目")))]),t._v(" "),n("div",{staticClass:"search-container auto"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))])],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,disabled:t.loadIng>0,simple:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports,w=(t,e)=>!(!t||!e)&&("String"===t?"string"==typeof e:"Object"===t?"[object Object]"===Object.prototype.toString.call(e):"number"===t?"number"==typeof e:"function"===t&&"[object Function]"===Object.prototype.toString.call(e)),_=(t,e,n)=>t.findIndex((t=>t[e]===n));const k=class{constructor(t="默认标题",e={}){this.title=t,this.options=e,this.support=!1,this.supportFn()}supportFn(){window.Notification?(this.initStatus(),this.support=!0):this.support=!1}initStatus(){this.notification=null,this.state=Notification.permission,this.msg=null,this.callBackObj={},this.notificationAll=[],this.requireInteractionTimeout=!1,this.timeout=null}initNotification(t){if(this.checkStatus("support")){if(!w("function",t))return console.error("initNotification的参数必须为函数");if("granted"===this.state)this.msg="already granted";else if("default"===this.state){const e=e=>(this.state=e,this.msg="granted"===e?"granted":"default"===e?"close":"denied",t(this.msg));try{Notification.requestPermission().then(e)}catch(t){Notification.requestPermission(e)}}else this.msg="already denied";return"default"!==this.state?t(this.msg):void 0}}userAgreed(){if(this.checkStatus("userAgreed")){this.notification=new Notification(this.title,this.options),this.notificationWatch();for(const t in this.callBackObj)this.notification[t]=e=>{this.callBackObj[t](e)}}}notificationTimeoutFn(t){t&&w("number",t)?this.timeout=t:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){w("number",this.timeout)&&(this.options.timeOut&&w("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(t){const e=this.notification.timestamp;setTimeout((()=>{const t=_(this.notificationAll,"timestamp",e);-1!==t&&this.notificationAll[t].close()}),t)}watchClose(){const t=this.notification.timestamp;this.notification.addEventListener("close",(e=>{const n=_(this.notificationAll,"timestamp",t);-1!==n&&this.notificationAll.splice(n,1)}))}autoClose(){const t=this.notification.timestamp;setTimeout((()=>{const e=_(this.notificationAll,"timestamp",t);-1!==e&&this.notificationAll.splice(e,1)}),6e3)}notificationEvent(t){if(this.checkStatus("support")){if(!w("Object",t))return console.error("callObj必须为对象");for(const e in t)if(!w("function",t[e]))return console.error("callObj对象中的每个value必须为函数");this.callBackObj=t}}closeAll(){for(let t of this.notificationAll.values())t.close();this.notificationAll=[]}close(){if(!this.notification)return console.warn("this.notification为null,通知尚未调用/用户未同意显示通知");this.notification.close()}updateOptions(t){if(t&&w("Object",t))for(const e in t)this.options[e]=t[e];else console.warn("updateOptions参数错误:options为必填对象")}replaceTitle(t){t&&w("String",t)?this.title=t:console.warn("replaceTitle: title(通知标题)为必填字符串")}replaceOptions(t){t&&w("Object",t)?this.options=t:console.warn("replaceOptions参数错误:options为必填对象")}checkStatus(t){if("support"===t){if(!this.support)return console.warn("用户浏览器不支持"),!1}else if("userAgreed"===t){if("granted"!==this.state)return!1;if(!this.checkStatus("support"))return!1}return!0}};const x={name:"TeamManagement",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},methods:{initLanguage:function(){var t=this;this.columns=[{title:this.$L("ID"),minWidth:50,maxWidth:70,key:"userid"},{title:this.$L("邮箱"),key:"email",minWidth:100,render:function(e,n){var r=n.row,o=[e("AutoTip",r.email)],i=r.identity;return i.includes("admin")&&o.push(e("Tag",{props:{color:"warning"}},t.$L("管理员"))),i.includes("disable")&&o.push(e("Tag",{props:{color:"error"}},t.$L("禁用"))),e("div",{class:"team-email"},o)}},{title:this.$L("昵称"),key:"nickname",minWidth:80,render:function(e,n){var r=n.row;return e("QuickEdit",{props:{value:r.nickname_original},on:{"on-update":function(e,n){t.operationUser({userid:r.userid,nickname:e}).then(n)}}},[e("AutoTip",r.nickname_original||"-")])}},{title:this.$L("职位/职称"),key:"profession",minWidth:80,render:function(e,n){var r=n.row;return e("QuickEdit",{props:{value:r.profession},on:{"on-update":function(e,n){t.operationUser({userid:r.userid,profession:e}).then(n)}}},[e("AutoTip",r.profession||"-")])}},{title:this.$L("最后在线"),key:"line_at",width:168},{title:this.$L("操作"),align:"center",width:100,render:function(e,n){var r=n.row.identity,o=[];r.includes("admin")?o.push(e("EDropdownItem",{props:{command:"clearadmin"}},[e("div",t.$L("取消管理员"))])):o.push(e("EDropdownItem",{props:{command:"setadmin"}},[e("div",t.$L("设为管理员"))])),r.includes("disable")?o.push(e("EDropdownItem",{props:{command:"cleardisable"}},[e("div",t.$L("取消禁用"))])):o.push(e("EDropdownItem",{props:{command:"setdisable"}},[e("div",t.$L("设为禁用"))])),o.push.apply(o,[e("EDropdownItem",{props:{command:"password"}},[e("div",t.$L("修改密码"))]),e("EDropdownItem",{props:{command:"delete"}},[e("div",t.$L("删除"))])]);var i=e("EDropdown",{props:{size:"small",trigger:"click"},on:{command:function(e){t.dropUser(e,n.row)}}},[e("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},t.$L("操作")),e("EDropdownMenu",{slot:"dropdown"},[o])]);return e("TableAction",{props:{column:n.column}},[i])}}]},getLists:function(){var t=this;this.loadIng++,this.$store.dispatch("call",{url:"users/lists",data:{keys:this.keys,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),20)}}).then((function(e){var n=e.data;t.loadIng--,t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.loadIng--,t.noText="数据加载失败"}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},dropUser:function(t,e){var n=this;switch(t){case"password":$A.modalInput({title:"修改密码",placeholder:"请输入新的密码",onOk:function(t){return t&&n.operationUser({userid:e.userid,password:t}),!0}});break;case"delete":$A.modalConfirm({content:"你确定要删除此帐号吗?",onOk:function(){n.operationUser({userid:e.userid,type:t})}});break;default:this.operationUser({userid:e.userid,type:t})}},operationUser:function(t){var e=this;return new Promise((function(n){e.loadIng++,e.$store.dispatch("call",{url:"users/operation",data:t}).then((function(t){var r=t.msg;$A.messageSuccess(r),e.loadIng--,e.getLists(),n()})).catch((function(t){var r=t.msg;$A.modalError(r),e.loadIng--,e.getLists(),n()}))}))}}};const S=(0,f.Z)(x,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"team-management"},[n("div",{staticClass:"management-title"},[t._v(t._s(t.$L("团队管理")))]),t._v(" "),n("div",{staticClass:"search-container"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("邮箱"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.email,callback:function(e){t.$set(t.keys,"email",e)},expression:"keys.email"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("昵称"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.nickname,callback:function(e){t.$set(t.keys,"nickname",e)},expression:"keys.nickname"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("职位/职称"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.position,callback:function(e){t.$set(t.keys,"position",e)},expression:"keys.position"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("身份"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{model:{value:t.keys.identity,callback:function(e){t.$set(t.keys,"identity",e)},expression:"keys.identity"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("管理员")))]),t._v(" "),n("Option",{attrs:{value:"disable"}},[t._v(t._s(t.$L("禁用")))])],1)],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))])],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,disabled:t.loadIng>0,simple:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports;const D={name:"ProjectManagement",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},methods:{initLanguage:function(){var t=this;this.columns=[{title:this.$L("ID"),key:"id"},{title:this.$L("项目名称"),key:"name",minWidth:100,render:function(e,n){var r=n.row,o=[e("AutoTip",r.name)];return r.archived_at&&o.push(e("Tag",{props:{color:"error"}},t.$L("已归档"))),e("div",{class:"project-name"},o)}},{title:this.$L("项目进度"),minWidth:100,render:function(t,e){var n=e.row,r=[t("AutoTip",n.task_complete+"/"+n.task_num),t("Progress",{props:{percent:n.task_percent,strokeWidth:5}})];return t("div",{class:"project-percent"},r)}},{title:this.$L("负责人"),minWidth:80,render:function(t,e){return t("UserAvatar",{props:{showName:!0,size:22,userid:e.row.owner_userid}})}},{title:this.$L("创建人"),minWidth:80,render:function(t,e){return t("UserAvatar",{props:{showName:!0,size:22,userid:e.row.userid}})}},{title:this.$L("创建时间"),key:"created_at",width:168}]},getLists:function(){var t=this,e="all";"archived"==this.keys.status?e="yes":"unarchived"==this.keys.status&&(e="no"),this.loadIng++,this.$store.dispatch("call",{url:"project/lists",data:{keys:this.keys,all:1,archived:e,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),20)}}).then((function(e){var n=e.data;t.loadIng--,t.page=n.current_page,t.total=n.total,t.list=n.data,t.noText="没有相关的数据"})).catch((function(){t.loadIng--,t.noText="数据加载失败"}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()}}};const E=(0,f.Z)(D,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-management"},[n("div",{staticClass:"management-title"},[t._v(t._s(t.$L("所有项目")))]),t._v(" "),n("div",{staticClass:"search-container auto"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目状态"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{model:{value:t.keys.status,callback:function(e){t.$set(t.keys,"status",e)},expression:"keys.status"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"unarchived"}},[t._v(t._s(t.$L("未归档")))]),t._v(" "),n("Option",{attrs:{value:"archived"}},[t._v(t._s(t.$L("已归档")))])],1)],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))])],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,disabled:t.loadIng>0,simple:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports;var N=n(62232);const A={name:"DragBallComponent",props:{id:{type:String,default:""},distanceLeft:{type:Number,default:-1},distanceRight:{type:Number,default:0},distanceTop:{type:Number,default:-1},distanceBottom:{type:Number,default:100},isScrollHidden:{type:Boolean,default:!1},isCanDraggable:{type:Boolean,default:!0},zIndex:{type:Number,default:50}},data:function(){return{clientWidth:null,clientHeight:null,top:0,left:0,timer:null,currentTop:0,isMoving:!1,record:{}}},created:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight},mounted:function(){var t=this;this.id&&($A.isJson(window._DragBallComponent)||(window._DragBallComponent={})),this.isCanDraggable&&this.$nextTick((function(){t.id&&$A.isJson(window._DragBallComponent[t.id])?(t.left=window._DragBallComponent[t.id].left,t.top=window._DragBallComponent[t.id].top):(t.distanceLeft>-1?t.left=t.distanceLeft:t.left=t.clientWidth-t.floatDrag.offsetWidth-t.distanceRight,t.distanceTop>-1?t.top=t.distanceTop:t.top=t.clientHeight-t.floatDrag.offsetHeight-t.distanceBottom),t.initDraggable()})),this.isScrollHidden&&window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.id&&(window._DragBallComponent[this.id]={left:this.left,top:this.top}),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize)},computed:{dragStyle:function(){return{left:this.left+"px",top:this.top+"px",zIndex:this.zIndex,position:"fixed"}},floatDrag:function(){return this.$refs.floatDrag}},methods:{handleScroll:function(){var t=this;this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){t.handleScrollEnd()}),200),this.currentTop=document.documentElement.scrollTop||document.body.scrollTop,this.left>this.clientWidth/2?this.left=this.clientWidth+this.floatDrag.offsetWidth:this.left=-this.floatDrag.offsetWidth},handleScrollEnd:function(){(document.documentElement.scrollTop||document.body.scrollTop)===this.currentTop&&(this.left>this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,clearTimeout(this.timer))},handleResize:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight,this.checkDraggablePosition()},initDraggable:function(){this.floatDrag.addEventListener("touchstart",this.toucheStart),this.floatDrag.addEventListener("touchmove",this.touchMove),this.floatDrag.addEventListener("touchend",this.touchEnd)},mouseDown:function(t){var e=this;this.record={time:(new Date).getTime(),top:this.floatDrag.offsetTop,left:this.floatDrag.offsetLeft,x:t.clientX-this.floatDrag.offsetLeft,y:t.clientY-this.floatDrag.offsetTop},this.floatDrag.style.transition="none",this.canClick=!1,document.onmousemove=function(t){var n=t.clientX-e.record.x,r=t.clientY-e.record.y;n<0?n=0:n>window.innerWidth-e.floatDrag.offsetWidth&&(n=window.innerWidth-e.floatDrag.offsetWidth),r<0?r=0:r>window.innerHeight-e.floatDrag.offsetHeight&&(r=window.innerHeight-e.floatDrag.offsetHeight),e.left=n,e.top=r},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,e.checkDraggablePosition(),e.floatDrag.style.transition="all 0.3s",(Math.abs(e.record.top-e.floatDrag.offsetTop)<5&&Math.abs(e.record.left-e.floatDrag.offsetLeft)<5||(new Date).getTime()-e.record.time<200)&&e.$emit("on-click")}},toucheStart:function(){this.canClick=!1,this.floatDrag.style.transition="none"},touchMove:function(t){if(this.canClick=!0,1===t.targetTouches.length){var e=event.targetTouches[0],n=e.clientX-this.floatDrag.offsetWidth/2,r=e.clientY-this.floatDrag.offsetHeight/2;n<0?n=0:n>window.innerWidth-this.floatDrag.offsetWidth&&(n=window.innerWidth-this.floatDrag.offsetWidth),r<0?r=0:r>window.innerHeight-this.floatDrag.offsetHeight&&(r=window.innerHeight-this.floatDrag.offsetHeight),this.left=n,this.top=r}},touchEnd:function(){this.canClick&&(this.floatDrag.style.transition="all 0.3s",this.checkDraggablePosition())},checkDraggablePosition:function(){this.left+this.floatDrag.offsetWidth/2>=this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,this.top<0&&(this.top=0),this.top+this.floatDrag.offsetHeight>=this.clientHeight&&(this.top=this.clientHeight-this.floatDrag.offsetHeight)}}};function T(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 L(t){for(var e=1;e-1})):e}}),watch:{$route:function(t){this.curPath=t.path,this.chackPass()},userInfo:function(){this.chackPass()},taskId:function(t){t>0&&this.$Modal.resetIndex()},msgAllUnread:function(t){this.isElectron&&this.$electron.ipcRenderer.send("setDockBadge",t)},dialogMsgPush:function(t){var e=this;if(this.natificationHidden&&this.natificationReady){var n=t.id,r=t.dialog_id,o=t.type,i=t.msg,a="";switch(o){case"text":a=i.text;break;case"file":a="["+this.$L("img"==i.type?"图片信息":"文件信息")+"]";break;default:return}this._notificationId=n,this.notificationClass.replaceOptions({icon:$A.originUrl("images/logo.png"),body:a,data:t,tag:"dialog",requireInteraction:!0});var s=this.dialogs.find((function(t){return t.id==r}));s?(this.notificationClass.replaceTitle(s.name),this.notificationClass.userAgreed()):this.$store.dispatch("getDialogOne",r).then((function(t){var r=t.data;e._notificationId===n&&(e.notificationClass.replaceTitle(r.name),e.notificationClass.userAgreed())}))}},projectKeyValue:function(t){var e=this;""!=t&&setTimeout((function(){e.projectKeyValue==t&&e.searchProject()}),600)},natificationHidden:function(t){var e=this;clearTimeout(this.notificationTimeout),t||(this.notificationTimeout=setTimeout((function(){e.notificationClass.close()}),6e3))}},methods:{initLanguage:function(){this.columns=[{label:this.$L("空白模板"),value:[]},{label:this.$L("软件开发"),value:[this.$L("产品规划"),this.$L("前端开发"),this.$L("后端开发"),this.$L("测试"),this.$L("发布"),this.$L("其它")]},{label:this.$L("产品开发"),value:[this.$L("产品计划"),this.$L("正在设计"),this.$L("正在研发"),this.$L("测试"),this.$L("准备发布"),this.$L("发布成功")]}],this.addRule={name:[{required:!0,message:this.$L("请填写项目名称!"),trigger:"change"},{type:"string",min:2,message:this.$L("项目名称至少2个字!"),trigger:"change"}]}},chackPass:function(){1===this.userInfo.changepass&&this.goForward({path:"/manage/setting/password"})},toggleRoute:function(t){this.show768Menu=!1,this.goForward({path:"/manage/"+t})},toggleOpenMenu:function(t){this.$set(this.openMenu,t,!this.openMenu[t])},settingRoute:function(t){var e=this;switch(t){case"allUser":return void(this.allUserShow=!0);case"allProject":return void(this.allProjectShow=!0);case"archivedProject":return void(this.archivedProjectShow=!0);case"clearCache":return this.$store.state.method.clearLocal(),this.$store.dispatch("saveUserInfo",this.userInfo),void $A.messageSuccess("清除成功");case"signout":return void $A.modalConfirm({title:"退出登录",content:"你确定要登出系统?",onOk:function(){e.$store.dispatch("logout")}})}this.menu.findIndex((function(e){return e.path==t}))>-1&&this.toggleRoute("setting/"+t)},menuVisibleChange:function(t){this.visibleMenu=t},classNameRoute:function(t,e){return{active:this.curPath=="/manage/"+t,"open-menu":!0===e}},onAddShow:function(){var t=this;this.addShow=!0,this.$nextTick((function(){t.$refs.projectName.focus()}))},onAddProject:function(){var t=this;this.$refs.addProject.validate((function(e){e&&(t.loadIng++,t.$store.dispatch("call",{url:"project/add",data:t.addData}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.loadIng--,t.addShow=!1,t.$refs.addProject.resetFields(),t.$store.dispatch("saveProject",n),t.toggleRoute("project/"+n.id)})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--})))}))},searchProject:function(){var t=this;!0!==this.projectKeyAlready[this.projectKeyValue]&&(this.projectKeyAlready[this.projectKeyValue]=!0,setTimeout((function(){t.projectKeyLoading++}),1e3),this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue}}).then((function(){t.projectKeyLoading--})).catch((function(){t.projectKeyLoading--})))},selectChange:function(t){var e=this;this.$nextTick((function(){e.$set(e.addData,"columns",e.columns[t].value.join(","))}))},taskVisibleChange:function(t){t||this.$store.dispatch("openTask",0)},notificationInit:function(){var t=this;this.notificationClass=new k(this.$L("打开通知成功")),this.notificationClass.support&&(this.notificationClass.notificationEvent({onclick:function(e){var n=e.target;console.log("[Notification] Click",n),t.notificationClass.close(),window.focus();var r=n.tag,o=n.data;if("dialog"==r){if(!$A.isJson(o))return;t.goForward({path:"/manage/messenger"}),o.dialog_id&&(t.$store.state.method.setStorage("messenger::dialogId",o.dialog_id),t.$store.state.dialogOpenId=o.dialog_id)}}}),this.notificationPermission())},notificationPermission:function(){var t=this;this.notificationClass.initNotification((function e(n){switch(n){case"already granted":case"granted":return t.natificationReady=!0;case"close":return t.notificationClass.initNotification(e);case"denied":case"already denied":"denied"===n?console.log("您刚刚拒绝显示通知 请在设置中更改设置"):console.log("您曾级拒绝显示通知 请在设置中更改设置")}}))},onVisibilityChange:function(){var t=this,e="hidden"in document?"hidden":"webkitHidden"in document?"webkitHidden":"mozHidden"in document?"mozHidden":null,n=e.replace(/hidden/i,"visibilitychange");document.addEventListener(n,(function(){t.natificationHidden=!!document[e]}))}}};const P=(0,f.Z)($,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.userId>0,expression:"userId > 0"}],staticClass:"page-manage"},[n("div",{staticClass:"manage-box-menu",class:{"show768-menu":t.show768Menu}},[n("Dropdown",{staticClass:"manage-box-dropdown",attrs:{trigger:"click"},on:{"on-click":t.settingRoute,"on-visible-change":t.menuVisibleChange}},[n("div",{class:["manage-box-title",t.visibleMenu?"menu-visible":""]},[n("div",{staticClass:"manage-box-avatar"},[n("UserAvatar",{attrs:{userid:t.userId,size:36,"tooltip-disabled":""}})],1),t._v(" "),n("span",[t._v(t._s(t.userInfo.nickname))]),t._v(" "),n("div",{staticClass:"manage-box-arrow"},[n("Icon",{attrs:{type:"ios-arrow-up"}}),t._v(" "),n("Icon",{attrs:{type:"ios-arrow-down"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t._l(t.menu,(function(e,r){return n("DropdownItem",{key:r,attrs:{divided:!!e.divided,name:e.path}},[t._v(t._s(t.$L(e.name)))])})),t._v(" "),n("Dropdown",{attrs:{placement:"right-start"},on:{"on-click":t.setLanguage}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-language"},[t._v("\n "+t._s(t.currentLanguage)+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.languageList,(function(e,r){return n("Dropdown-item",{key:r,attrs:{name:r,selected:t.getLanguage()===r}},[t._v(t._s(e))])})),1)],1),t._v(" "),n("DropdownItem",{staticStyle:{color:"#f40"},attrs:{divided:"",name:"signout"}},[t._v(t._s(t.$L("退出登录")))])],2)],1),t._v(" "),n("ul",{staticClass:"overlay-y"},[n("li",{class:t.classNameRoute("dashboard"),on:{click:function(e){return t.toggleRoute("dashboard")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("仪表盘")))])]),t._v(" "),n("li",{class:t.classNameRoute("calendar"),on:{click:function(e){return t.toggleRoute("calendar")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("日历")))])]),t._v(" "),n("li",{class:t.classNameRoute("messenger"),on:{click:function(e){return t.toggleRoute("messenger")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("消息")))]),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{count:t.msgAllUnread}})],1),t._v(" "),n("li",{class:t.classNameRoute("file"),on:{click:function(e){return t.toggleRoute("file")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("文件")))])]),t._v(" "),n("li",{staticClass:"menu-project"},[n("ul",t._l(t.projectLists,(function(e,r){return n("li",{key:r,class:t.classNameRoute("project/"+e.id,t.openMenu[e.id]),on:{click:function(n){return t.toggleRoute("project/"+e.id)}}},[n("div",{staticClass:"project-h1"},[n("em",{on:{click:function(n){return n.stopPropagation(),t.toggleOpenMenu(e.id)}}}),t._v(" "),n("div",{staticClass:"title"},[t._v(t._s(e.name))]),t._v(" "),e.task_my_num-e.task_my_complete>0?n("div",{staticClass:"num"},[t._v(t._s(e.task_my_num-e.task_my_complete))]):t._e()]),t._v(" "),n("div",{staticClass:"project-h2"},[n("p",[n("em",[t._v(t._s(t.$L("我的"))+":")]),t._v(" "),n("span",[t._v(t._s(e.task_my_complete)+"/"+t._s(e.task_my_num))]),t._v(" "),n("Progress",{attrs:{percent:e.task_my_percent,"stroke-width":6}})],1),t._v(" "),n("p",[n("em",[t._v(t._s(t.$L("全部"))+":")]),t._v(" "),n("span",[t._v(t._s(e.task_complete)+"/"+t._s(e.task_num))]),t._v(" "),n("Progress",{attrs:{percent:e.task_percent,"stroke-width":6}})],1)])])})),0),t._v(" "),t.loadIng>0?n("Loading"):t._e()],1)]),t._v(" "),t.projectTotal>100?n("div",{staticClass:"manage-project-search",class:{loading:t.projectKeyLoading>0}},[n("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("共"+t.projectTotal+"个项目,搜索..."),clearable:""},model:{value:t.projectKeyValue,callback:function(e){t.projectKeyValue=e},expression:"projectKeyValue"}})],1):t._e(),t._v(" "),n("Button",{staticClass:"manage-box-new",attrs:{type:"primary",icon:"md-add"},on:{click:t.onAddShow}},[t._v(t._s(t.$L("新建项目")))])],1),t._v(" "),n("div",{staticClass:"manage-box-main"},[n("keep-alive",[n("router-view",{staticClass:"manage-box-view overlay"})],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("新建项目"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[n("Form",{ref:"addProject",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[n("Input",{ref:"projectName",attrs:{type:"text"},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1),t._v(" "),t.addData.columns?n("FormItem",{attrs:{label:t.$L("任务列表")}},[n("TagInput",{model:{value:t.addData.columns,callback:function(e){t.$set(t.addData,"columns",e)},expression:"addData.columns"}})],1):n("FormItem",{attrs:{label:t.$L("项目模板")}},[n("Select",{attrs:{value:0,placeholder:t.$L("请选择模板")},on:{"on-change":t.selectChange}},t._l(t.columns,(function(e,r){return n("Option",{key:r,attrs:{value:r}},[t._v(t._s(e.label))])})),1)],1)],1),t._v(" "),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAddProject}},[t._v(t._s(t.$L("添加")))])],1)],1),t._v(" "),n("Modal",{attrs:{value:t.taskId>0,"mask-closable":!1,styles:{width:"90%",maxWidth:t.taskData.dialog_id?"1200px":"640px"},"footer-hide":""},on:{"on-visible-change":t.taskVisibleChange}},[n("TaskDetail",{attrs:{"open-task":t.taskData}})],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?n("TeamManagement"):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.allProjectShow,callback:function(e){t.allProjectShow=e},expression:"allProjectShow"}},[t.allProjectShow?n("ProjectManagement"):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.archivedProjectShow,callback:function(e){t.archivedProjectShow=e},expression:"archivedProjectShow"}},[t.archivedProjectShow?n("ProjectArchived"):t._e()],1),t._v(" "),n("DragBallComponent",{attrs:{distanceLeft:0,distanceTop:60},on:{"on-click":function(e){t.show768Menu=!t.show768Menu}}},[n("div",{staticClass:"manage-mini-menu"},[n("Icon",{attrs:{type:t.show768Menu?"md-close":"md-menu"}})],1)])],1)}),[],!1,null,null,null).exports},3141:(t,e,n)=>{"use strict";n.d(e,{Z:()=>A});const r=n(70538).default.prototype.$isServer;function o(t,e){for(let n=0;n`${t}:${r.getPropertyValue(t)}`)).join(";"),paddingSize:i,borderSize:s,boxSizing:o};return e&&n&&(u[n]=c),c}(t,r);s.setAttribute("style",`${l};\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n`),s.value=t.value||t.placeholder||"";let f,d=Number.MIN_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,p=s.scrollHeight;if("border-box"===c?p+=i:"content-box"===c&&(p-=o),null!==e||null!==n){s.value=" ";let t=s.scrollHeight-o;null!==e&&(d=t*e,"border-box"===c&&(d=d+o+i),p=Math.max(d,p)),null!==n&&(m=t*n,"border-box"===c&&(m=m+o+i),f=p>m?"":"hidden",p=Math.min(m,p))}return n||(f="hidden"),{height:`${p}px`,minHeight:`${d}px`,maxHeight:`${m}px`,overflowY:f}}function l(t,e,n){this.$children.forEach((r=>{r.$options.name===t?r.$emit.apply(r,[e].concat(n)):l.apply(r,[t,e].concat([n]))}))}function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d="ivu-input";const m={name:"DragInput",mixins:[{methods:{dispatch(t,e,n){let r=this.$parent||this.$root,o=r.$options.name;for(;r&&(!o||o!==t);)r=r.$parent,r&&(o=r.$options.name);r&&r.$emit.apply(r,[e].concat(n))},broadcast(t,e,n){l.call(this,t,e,n)}}},{inject:{FormInstance:{default:""}},computed:{itemDisabled(){let t=this.disabled;return!t&&this.FormInstance&&(t=this.FormInstance.disabled),t}}}],props:{type:{validator:function(t){return o(t,["text","textarea","password","url","email","date","number","tel"])},default:"text"},value:{type:[String,Number],default:""},size:{validator:function(t){return o(t,["small","large","default"])},default:function(){return this.$IVIEW&&""!==this.$IVIEW.size?this.$IVIEW.size:"default"}},placeholder:{type:String,default:""},maxlength:{type:[String,Number]},disabled:{type:Boolean,default:!1},icon:String,autosize:{type:[Boolean,Object],default:!1},rows:{type:Number,default:2},readonly:{type:Boolean,default:!1},name:{type:String},number:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},clearable:{type:Boolean,default:!1},elementId:{type:String},wrap:{validator:function(t){return o(t,["hard","soft"])},default:"soft"},prefix:{type:String,default:""},suffix:{type:String,default:""},search:{type:Boolean,default:!1},enterButton:{type:[Boolean,String],default:!1},showWordLimit:{type:Boolean,default:!1},password:{type:Boolean,default:!1}},data:function(){return{currentValue:this.value,prefixCls:d,slotReady:!1,textareaStyles:{},isOnComposition:!1,showPassword:!1}},computed:{currentType:function(){var t=this.type;return"password"===t&&this.password&&this.showPassword&&(t="text"),t},prepend:function(){var t=!1;return"textarea"!==this.type&&(t=void 0!==this.$slots.prepend),t},append:function(){var t=!1;return"textarea"!==this.type&&(t=void 0!==this.$slots.append),t},showPrefix:function(){var t=!1;return"textarea"!==this.type&&(t=""!==this.prefix||void 0!==this.$slots.prefix),t},showSuffix:function(){var t=!1;return"textarea"!==this.type&&(t=""!==this.suffix||void 0!==this.$slots.suffix),t},wrapClasses:function(){var t;return["".concat(d,"-wrapper"),(t={},f(t,"".concat(d,"-wrapper-").concat(this.size),!!this.size),f(t,"".concat(d,"-type-").concat(this.type),this.type),f(t,"".concat(d,"-group"),this.prepend||this.append||this.search&&this.enterButton),f(t,"".concat(d,"-group-").concat(this.size),(this.prepend||this.append||this.search&&this.enterButton)&&!!this.size),f(t,"".concat(d,"-group-with-prepend"),this.prepend),f(t,"".concat(d,"-group-with-append"),this.append||this.search&&this.enterButton),f(t,"".concat(d,"-hide-icon"),this.append),f(t,"".concat(d,"-with-search"),this.search&&this.enterButton),t)]},inputClasses:function(){var t;return["".concat(d),(t={},f(t,"".concat(d,"-").concat(this.size),!!this.size),f(t,"".concat(d,"-disabled"),this.itemDisabled),f(t,"".concat(d,"-with-prefix"),this.showPrefix),f(t,"".concat(d,"-with-suffix"),this.showSuffix||this.search&&!1===this.enterButton),t)]},textareaClasses:function(){return["".concat(d),f({},"".concat(d,"-disabled"),this.itemDisabled)]},upperLimit:function(){return this.maxlength},textLength:function(){return"number"==typeof this.value?String(this.value).length:(this.value||"").length}},methods:{handleEnter:function(t){this.$emit("on-enter",t),this.search&&this.$emit("on-search",this.currentValue)},handleKeydown:function(t){this.$emit("on-keydown",t)},handleKeypress:function(t){this.$emit("on-keypress",t)},handleKeyup:function(t){this.$emit("on-keyup",t)},handleIconClick:function(t){this.$emit("on-click",t)},handleFocus:function(t){this.$emit("on-focus",t)},handleBlur:function(t){this.$emit("on-blur",t),i(this,["DatePicker","TimePicker","Cascader","Search"])||this.dispatch("FormItem","on-form-blur",this.currentValue)},handleComposition:function(t){"compositionstart"===t.type&&(this.isOnComposition=!0),"compositionend"===t.type&&(this.isOnComposition=!1,this.handleInput(t))},handleInput:function(t){if(!this.isOnComposition){var e=t.target.value;this.number&&""!==e&&(e=Number.isNaN(Number(e))?e:Number(e)),this.$emit("input",e),this.setCurrentValue(e),this.$emit("on-change",t)}},handleChange:function(t){this.$emit("on-input-change",t)},handlePaste:function(t){this.$emit("on-input-paste",t)},setCurrentValue:function(t){var e=this;t!==this.currentValue&&(this.$nextTick((function(){e.resizeTextarea()})),this.currentValue=t,i(this,["DatePicker","TimePicker","Cascader","Search"])||this.dispatch("FormItem","on-form-change",t))},resizeTextarea:function(){var t=this.autosize;if(!t||"textarea"!==this.type)return!1;var e=t.minRows,n=t.maxRows;this.textareaStyles=c(this.$refs.textarea,e,n)},focus:function(){"textarea"===this.type?this.$refs.textarea.focus():this.$refs.input.focus()},blur:function(){"textarea"===this.type?this.$refs.textarea.blur():this.$refs.input.blur()},handleClear:function(){this.$emit("input",""),this.setCurrentValue(""),this.$emit("on-change",{target:{value:""}}),this.$emit("on-clear")},handleSearch:function(){if(this.itemDisabled)return!1;this.$refs.input.focus(),this.$emit("on-search",this.currentValue)},handleToggleShowPassword:function(){var t=this;if(this.itemDisabled)return!1;this.showPassword=!this.showPassword,this.focus();var e=this.currentValue.length;setTimeout((function(){t.$refs.input.setSelectionRange(e,e)}),0)}},watch:{value:function(t){this.setCurrentValue(t)}},mounted:function(){this.slotReady=!0,this.resizeTextarea()}};var p=n(51900);const h=(0,p.Z)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.wrapClasses},["textarea"!==t.type?[t.prepend?n("div",{directives:[{name:"show",rawName:"v-show",value:t.slotReady,expression:"slotReady"}],class:[t.prefixCls+"-group-prepend"]},[t._t("prepend")],2):t._e(),t._v(" "),t.clearable&&t.currentValue&&!t.itemDisabled?n("i",{staticClass:"ivu-icon",class:["ivu-icon-ios-close-circle",t.prefixCls+"-icon",t.prefixCls+"-icon-clear",t.prefixCls+"-icon-normal"],on:{click:t.handleClear}}):t.icon?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.icon,t.prefixCls+"-icon",t.prefixCls+"-icon-normal"],on:{click:t.handleIconClick}}):t.search&&!1===t.enterButton?n("i",{staticClass:"ivu-icon ivu-icon-ios-search",class:[t.prefixCls+"-icon",t.prefixCls+"-icon-normal",t.prefixCls+"-search-icon"],on:{click:t.handleSearch}}):t.showSuffix?n("span",{staticClass:"ivu-input-suffix"},[t._t("suffix",(function(){return[t.suffix?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.suffix]}):t._e()]}))],2):t.showWordLimit?n("span",{staticClass:"ivu-input-word-count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t.password?n("span",{staticClass:"ivu-input-suffix",on:{click:t.handleToggleShowPassword}},[t.showPassword?n("i",{staticClass:"ivu-icon ivu-icon-ios-eye-off-outline"}):n("i",{staticClass:"ivu-icon ivu-icon-ios-eye-outline"})]):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},[t.icon?t._e():n("i",{staticClass:"ivu-icon ivu-icon-ios-loading ivu-load-loop",class:[t.prefixCls+"-icon",t.prefixCls+"-icon-validate"]})]),t._v(" "),n("input",{ref:"input",class:t.inputClasses,attrs:{id:t.elementId,autocomplete:t.autocomplete,spellcheck:t.spellcheck,type:t.currentType,placeholder:t.placeholder,disabled:t.itemDisabled,maxlength:t.maxlength,readonly:t.readonly,name:t.name,number:t.number,autofocus:t.autofocus},domProps:{value:t.currentValue},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleEnter.apply(null,arguments)},t.handleKeyup],keypress:t.handleKeypress,keydown:t.handleKeydown,focus:t.handleFocus,blur:t.handleBlur,compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:t.handleInput,change:t.handleChange,paste:t.handlePaste}}),t._v(" "),t.append?n("div",{directives:[{name:"show",rawName:"v-show",value:t.slotReady,expression:"slotReady"}],class:[t.prefixCls+"-group-append"]},[t._t("append")],2):t.search&&t.enterButton?n("div",{class:[t.prefixCls+"-group-append",t.prefixCls+"-search"],on:{click:t.handleSearch}},[!0===t.enterButton?n("i",{staticClass:"ivu-icon ivu-icon-ios-search"}):[t._v(t._s(t.enterButton))]],2):t.showPrefix?n("span",{staticClass:"ivu-input-prefix"},[t._t("prefix",(function(){return[t.prefix?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.prefix]}):t._e()]}))],2):t._e()]:[n("textarea",{ref:"textarea",class:t.textareaClasses,style:t.textareaStyles,attrs:{id:t.elementId,wrap:t.wrap,autocomplete:t.autocomplete,spellcheck:t.spellcheck,placeholder:t.placeholder,disabled:t.itemDisabled,rows:t.rows,maxlength:t.maxlength,readonly:t.readonly,name:t.name,autofocus:t.autofocus},domProps:{value:t.currentValue},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleEnter.apply(null,arguments)},t.handleKeyup],keypress:t.handleKeypress,keydown:t.handleKeydown,focus:t.handleFocus,blur:t.handleBlur,compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:t.handleInput,paste:t.handlePaste}}),t._v(" "),t.showWordLimit?n("span",{staticClass:"ivu-input-word-count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()]],2)}),[],!1,null,null,null).exports;var g=n(1244),v=n(20629);const y={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style:function(){var t=this.size;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args:function(){var t=this.percent,e=Math.min(360,3.6*t);return 360==e?e=0:0==e&&(e=360),{x:14,y:14,r:14,start:360,end:e}}},methods:{isNumeric:function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},point:function(t,e,n,r){return[(t+Math.sin(r)*n).toFixed(2),(e-Math.cos(r)*n).toFixed(2)]},full:function(t,e,n,r){return r<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-r," ").concat(e," A ").concat(r," ").concat(r," 0 1 1 ").concat(t+r," ").concat(e," A ").concat(r," ").concat(r," 1 1 1 ").concat(t-r," ").concat(e," Z")},part:function(t,e,n,r,o,i){var a=o/360*2*Math.PI,s=i/360*2*Math.PI,u=[this.point(t,e,r,a),this.point(t,e,n,a),this.point(t,e,n,s),this.point(t,e,r,s)],c=s-a>Math.PI?"1":"0";return"M ".concat(u[0][0]," ").concat(u[0][1]," L ").concat(u[1][0]," ").concat(u[1][1]," A ").concat(n," ").concat(n," 0 ").concat(c," 1 ").concat(u[2][0]," ").concat(u[2][1]," L ").concat(u[3][0]," ").concat(u[3][1]," A ").concat(r," ").concat(r," 0 ").concat(c," 0 ").concat(u[0][0]," ").concat(u[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.R,a=void 0===i?0:i,s=t.r,u=void 0===s?0:s,c=t.start,l=t.end,f=[Math.max(a,u),Math.min(a,u)];if(u=f[1],(a=f[0])<=0)return"";if(c!==+c||l!==+l)return this.full(n,o,a,u);if(Math.abs(c-l)<1e-6)return"";if(Math.abs(c-l)%360<1e-6)return this.full(n,o,a,u);var d=[c%360,l%360];return(c=d[0])>(l=d[1])&&(l+=360),this.part(n,o,a,u,c,l)}}};const b={name:"DialogView",components:{WCircle:(0,p.Z)(y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[n("svg",{attrs:{viewBox:"0 0 28 28"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[n("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),n("g",{attrs:{"fill-rule":"nonzero"}},[n("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports},props:{msgData:{type:Object,default:function(){return{}}},dialogType:{type:String,default:""}},data:function(){return{read_list:[]}},activated:function(){this.msgRead()},computed:{readList:function(){return this.read_list.filter((function(t){return t.read_at}))},unreadList:function(){return this.read_list.filter((function(t){return!t.read_at}))}},watch:{msgData:{handler:function(){this.msgRead()},immediate:!0}},methods:{msgRead:function(){var t=this;!0!==this.msgData._r&&(this.msgData._r=!0,this.$nextTick((function(){t.$el.offsetParent?t.$store.dispatch("dialogMsgRead",t.msgData):t.msgData._r=!1})))},popperShow:function(){var t=this;this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.read_list=n})).catch((function(){t.read_list=[]}))},formatTime:function(t){var e=Math.round($A.Date(t).getTime()/1e3);return($A.formatDate("Ymd")===$A.formatDate("Ymd",e)?$A.formatDate("H:i",e):$A.formatDate("Y")===$A.formatDate("Y",e)?$A.formatDate("m-d",e):$A.formatDate("Y-m-d",e))||""},textMsg:function(t){return t?t=(t=t.trim().replace(/(\n\x20*){3,}/g,"

")).trim().replace(/\n/g,"
"):""},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var r=e,o=n;return(e>220||n>220)&&(e>n?(r=220,o=n*(220/e)):(r=e*(220/n),o=220)),{width:r+"px",height:o+"px"}}return{}}}};const C=(0,p.Z)(b,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-view",attrs:{"data-id":t.msgData.id}},["text"===t.msgData.type?n("div",{staticClass:"dialog-content",domProps:{innerHTML:t._s(t.textMsg(t.msgData.msg.text))}}):"loading"===t.msgData.type?n("div",{staticClass:"dialog-content loading"},[n("Loading")],1):"file"===t.msgData.type?n("div",{class:["dialog-content",t.msgData.msg.type]},[n("a",{attrs:{href:t.msgData.msg.path,target:"_blank"}},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb}}):n("div",{staticClass:"file-box"},[n("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),n("div",{staticClass:"file-info"},[n("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):n("div",{staticClass:"dialog-content unknown"},[t._v(t._s(t.$L("未知的消息类型")))]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time"},[t._v(t._s(t.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("Poptip",{staticClass:"percent",attrs:{placement:"left-end",transfer:"",width:360,offset:8},on:{"on-popper-show":t.popperShow}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content",attrs:{slot:"content"},slot:"content"},[n("ul",{staticClass:"read"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,"show-name":""}})],1)}))],2),t._v(" "),n("ul",{staticClass:"unread"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,"show-name":""}})],1)}))],2)]),t._v(" "),n("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?n("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):n("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})],1):n("div",{staticClass:"dialog-foot"},[n("Loading")],1)])}),[],!1,null,null,null).exports;function w(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 _(t){for(var e=1;e0&&(t.preventDefault(),o.forEach((function(t){n.$refs.chatUpload.upload(t)})))},chatDragOver:function(t,e){var n=this,r=this.__dialogDrag=$A.randomString(8);if(t){if("move"===e.dataTransfer.effectAllowed)return;this.dialogDrag=!0}else setTimeout((function(){r===n.__dialogDrag&&(n.dialogDrag=t)}),150)},chatPasteDrag:function(t,e){var n=this;this.dialogDrag=!1;var r="drag"===e?t.dataTransfer.files:t.clipboardData.files,o=Array.prototype.slice.call(r);o.length>0&&(t.preventDefault(),o.forEach((function(t){n.$refs.chatUpload.upload(t)})))},chatFile:function(t,e){switch(t){case"progress":this.tempMsgs.push({id:e.tempId,dialog_id:this.dialogData.id,type:"loading",userid:this.userId,msg:{}}),this.autoBottom=!0,this.onActive();break;case"error":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId}));break;case"success":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId})),this.sendSuccess(e.data)}},sendSuccess:function(t){this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",this.dialogId),this.$store.dispatch("moveDialogTop",this.dialogId),this.$store.dispatch("updateDialogLastMsg",t),this.onActive()},chatScroll:function(t){switch(t.directionreal){case"up":t.scrollE<10&&(this.autoBottom=!0);break;case"down":this.autoBottom=!1}1===t.scale&&(this.autoBottom=!0)},goBottom:function(){this.autoBottom&&(this.msgNew=0,this.$refs.scroller.autoToBottom())},goNewBottom:function(){this.autoBottom=!0,this.goBottom()},onEventFocus:function(t){this.inputFocus=!0,this.$emit("on-focus",t)},onEventblur:function(t){this.inputFocus=!1,this.$emit("on-blur",t)},onActive:function(){this.$emit("on-active")},formatTime:function(t){var e=Math.round($A.Date(t).getTime()/1e3);return($A.formatDate("Ymd")===$A.formatDate("Ymd",e)?$A.formatDate("H:i",e):$A.formatDate("Y")===$A.formatDate("Y",e)?$A.formatDate("m-d",e):$A.formatDate("Y-m-d",e))||""},openProject:function(){this.dialogData.group_info&&this.goForward({path:"/manage/project/"+this.dialogData.group_info.id})},openTask:function(){this.dialogData.group_info&&this.$store.dispatch("openTask",this.dialogData.group_info.id)},loadNextPage:function(){var t=this,e=this.dialogMsgList[0].id;this.$store.dispatch("getDialogMsgNextPage",this.dialogId).then((function(){t.$nextTick((function(){t.topId=e;var n=document.getElementById("view_"+e);if(n)try{n.scrollIntoView(!0)}catch(t){scrollIntoView(n,{behavior:"instant",inline:"start"})}}))}))}}};const A=(0,p.Z)(N,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-wrapper",on:{drop:function(e){return e.preventDefault(),t.chatPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.chatDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.chatDragOver(!1,e)}}},[t._t("head",(function(){return[n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[n("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?n("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e()]),t._v(" "),"group"===t.dialogData.type?["project"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openProject}},[t._v("\n "+t._s(t.$L("项目聊天室"))+" "+t._s(t.$L("打开项目管理"))+"\n ")]):"task"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openTask}},[t._v("\n "+t._s(t.$L("任务聊天室"))+" "+t._s(t.$L("查看任务详情"))+"\n ")]):t._e()]:t._e()],2)]})),t._v(" "),n("ScrollerY",{ref:"scroller",staticClass:"dialog-scroller overlay-y",attrs:{"auto-bottom":t.autoBottom&&!t.inputFocus,static:""},on:{"on-scroll":t.chatScroll}},[n("div",{ref:"manageList",staticClass:"dialog-list"},[n("ul",[t.dialogData.hasMorePages?n("li",{staticClass:"history",on:{click:t.loadNextPage}},[t._v(t._s(t.$L("加载历史消息")))]):t.dialogData.loading>0&&0===t.dialogMsgList.length?n("li",{staticClass:"loading"},[n("Loading")],1):0===t.dialogMsgList.length?n("li",{staticClass:"nothing"},[t._v(t._s(t.$L("暂无消息")))]):t._e(),t._v(" "),t._l(t.dialogMsgList,(function(e){return n("li",{key:e.id,class:{self:e.userid==t.userId,"history-tip":t.topId==e.id},attrs:{id:"view_"+e.id}},[t.topId==e.id?n("em",{staticClass:"history-text"},[t._v(t._s(t.$L("历史消息")))]):t._e(),t._v(" "),n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:e.userid,"tooltip-disabled":e.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":e,"dialog-type":t.dialogData.type}})],1)})),t._v(" "),t._l(t.tempMsgList,(function(e){return n("li",{key:"tmp_"+e.id,class:{self:e.userid==t.userId},attrs:{id:"tmp_"+e.id}},[n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:e.userid,"tooltip-disabled":e.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":e,"dialog-type":t.dialogData.type}})],1)}))],2)])]),t._v(" "),n("div",{class:["dialog-footer",t.msgNew>0&&t.dialogMsgList.length>0?"newmsg":""],on:{click:t.onActive}},[n("div",{staticClass:"dialog-newmsg",on:{click:t.goNewBottom}},[t._v(t._s(t.$L("有"+t.msgNew+"条新消息")))]),t._v(" "),t._t("inputBefore"),t._v(" "),n("DragInput",{ref:"input",staticClass:"dialog-input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventblur,"on-keydown":t.chatKeydown,"on-input-paste":t.pasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),""!=t.msgText?n("div",{staticClass:"dialog-send",on:{click:t.sendMsg}},[n("Icon",{attrs:{type:"md-send"}})],1):t._e(),t._v(" "),n("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId},on:{"on-progress":function(e){return t.chatFile("progress",e)},"on-success":function(e){return t.chatFile("success",e)},"on-error":function(e){return t.chatFile("error",e)}}})],2),t._v(" "),t.dialogDrag?n("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[n("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e()],2)}),[],!1,null,null,null).exports},72827:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});function r(t){return(r="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})(t)}const o={name:"ProjectLog",props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0}},data:function(){return{loadIng:0,lists:{},listPage:1,hasMorePages:!1,totalNum:-1}},mounted:function(){this.getLists(!0)},computed:{},watch:{projectId:function(){this.lists={},this.getLists(!0)},taskId:function(){this.lists={},this.getLists(!0)}},methods:{logDate:function(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("今天"):t.key},getLists:function(t){var e=this;!0===t&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:this.pagesize}}).then((function(n){var o=n.data;e.loadIng--,!0===t&&(e.lists={}),o.data.forEach((function(t){var n=t.time,o=n.ymd+" "+n.week;"object"!==r(e.lists[o])&&e.$set(e.lists,o,{key:o,ymd:n.ymd,lists:[]}),e.lists[o].lists.push(t)})),e.hasMorePages=o.current_page0?n("li",{staticClass:"logs-loading"},[n("Loading")],1):t.hasMorePages?n("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("加载更多")))]):0==t.totalNum?n("li",{staticClass:"logs-none",on:{click:function(e){return t.getLists(!0)}}},[t._v(t._s(t.$L("没有任何动态")))]):t._e()],2)])}),[],!1,null,null,null).exports},26575:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data:function(){return{}},computed:{myStyle:function(){var t=this.color,e=this.background;return{color:t,backgroundColor:this.backgroundColor||e}}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)}),[],!1,null,null,null).exports}}]); \ No newline at end of file +(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[107,501],{47575:(t,e,n)=>{!function(){"use strict";var e=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return{eq:t}},o=r((function(t,e){return t===e})),i=function(t){return r((function(e,n){if(e.length!==n.length)return!1;for(var r=e.length,o=0;o-1},U=function(t,e){for(var n=0,r=t.length;n=0;n--){e(t[n],n)}},W=function(t,e){for(var n=[],r=0,o=t.length;r=0&&e=e.length&&t.substr(n,n+e.length)===e}(t,e,0)},It=function(t){return function(e){return e.replace(t,"")}},Bt=It(/^\s+|\s+$/g),Mt=It(/^\s+/g),jt=It(/\s+$/g),Ft=function(t){return t.length>0},zt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ut=function(t){return function(e){return Pt(e,t)}},Vt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Pt(t,"edge/")&&Pt(t,"chrome")&&Pt(t,"safari")&&Pt(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,zt],search:function(t){return Pt(t,"chrome")&&!Pt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Pt(t,"msie")||Pt(t,"trident")}},{name:"Opera",versionRegexes:[zt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ut("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ut("firefox")},{name:"Safari",versionRegexes:[zt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Pt(t,"safari")||Pt(t,"mobile/"))&&Pt(t,"applewebkit")}}],Ht=[{name:"Windows",search:Ut("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Pt(t,"iphone")||Pt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ut("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ut("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ut("linux"),versionRegexes:[]},{name:"Solaris",search:Ut("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ut("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ut("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],qt={browsers:x(Vt),oses:x(Ht)},Wt="Edge",Kt="Chrome",Yt="Opera",Xt="Firefox",Gt="Safari",Zt=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(Wt),isChrome:r(Kt),isIE:r("IE"),isOpera:r(Yt),isFirefox:r(Xt),isSafari:r(Gt)}},Jt={unknown:function(){return Zt({current:void 0,version:Tt.unknown()})},nu:Zt,edge:x(Wt),chrome:x(Kt),ie:x("IE"),opera:x(Yt),firefox:x(Xt),safari:x(Gt)},Qt="Windows",te="Android",ee="Linux",ne="Solaris",re="FreeBSD",oe="ChromeOS",ie=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(Qt),isiOS:r("iOS"),isAndroid:r(te),isOSX:r("OSX"),isLinux:r(ee),isSolaris:r(ne),isFreeBSD:r(re),isChromeOS:r(oe)}},ae={unknown:function(){return ie({current:void 0,version:Tt.unknown()})},nu:ie,windows:x(Qt),ios:x("iOS"),android:x(te),linux:x(ee),osx:x("OSX"),solaris:x(ne),freebsd:x(re),chromeos:x(oe)},se=function(t,e){var n=qt.browsers(),r=qt.oses(),o=Ot(n,t).fold(Jt.unknown,Jt.nu),i=$t(r,t).fold(ae.unknown,ae.nu),a=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),s=a||r("(pointer:coarse)"),u=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!u,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!c&&!u&&!l;return{isiPad:x(o),isiPhone:x(i),isTablet:x(u),isPhone:x(c),isTouch:x(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:x(l),isDesktop:x(f)}}(i,o,t,e);return{browser:o,os:i,deviceType:a}},ue=function(t){return window.matchMedia(t).matches},ce=function(t){var e,n=!1;return function(){for(var r=[],o=0;o1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Se(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Se(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Se(n)},fromDom:Se,fromPoint:function(t,e,n){return I.from(t.dom.elementFromPoint(e,n)).map(Se)}},Ee=function(t,e){var n=[],r=function(t){return n.push(t),e(t)},o=e(t);do{o=o.bind(r)}while(o.isSome());return n},Ne=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Ae=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Te=function(t,e){return t.dom===e.dom},Le=function(t,e){return n=t.dom,r=e.dom,function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(n,r,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,r},Oe=function(t,e){return le().browser.isIE()?Le(t,e):function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)}(t,e)},$e=("undefined"!=typeof window?window:Function("return this;")(),function(t){return t.dom.nodeName.toLowerCase()}),Pe=function(t){return t.dom.nodeType},Re=function(t){return function(e){return Pe(e)===t}},Ie=Re(1),Be=Re(3),Me=Re(9),je=Re(11),Fe=function(t){return De.fromDom(t.dom.ownerDocument)},ze=function(t){return Me(t)?t:Fe(t)},Ue=function(t){return De.fromDom(ze(t).dom.defaultView)},Ve=function(t){return I.from(t.dom.parentNode).map(De.fromDom)},He=function(t){return I.from(t.dom.previousSibling).map(De.fromDom)},qe=function(t){return I.from(t.dom.nextSibling).map(De.fromDom)},We=function(t){return Q(Ee(t,He))},Ke=function(t){return Ee(t,qe)},Ye=function(t){return V(t.dom.childNodes,De.fromDom)},Xe=function(t,e){var n=t.dom.childNodes;return I.from(n[e]).map(De.fromDom)},Ge=function(t){return Xe(t,0)},Ze=function(t){return Xe(t,t.dom.childNodes.length-1)},Je=function(t){return je(t)&&b(t.dom.host)},Qe=C(Element.prototype.attachShadow)&&C(Node.prototype.getRootNode),tn=x(Qe),en=Qe?function(t){return De.fromDom(t.dom.getRootNode())}:ze,nn=function(t){return Je(t)?t:function(t){var e=t.dom.head;if(null==e)throw new Error("Head is not available yet");return De.fromDom(e)}(ze(t))},rn=function(t){return De.fromDom(t.dom.host)},on=function(t){return b(t.dom.shadowRoot)},an=function(t,e){Ve(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},sn=function(t,e){qe(t).fold((function(){Ve(t).each((function(t){cn(t,e)}))}),(function(t){an(t,e)}))},un=function(t,e){Ge(t).fold((function(){cn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},cn=function(t,e){t.dom.appendChild(e.dom)},ln=function(t,e){H(e,(function(e){cn(t,e)}))},fn=function(t){t.dom.textContent="",H(Ye(t),(function(t){dn(t)}))},dn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},mn=function(t){var e,n=Ye(t);n.length>0&&(e=t,H(n,(function(t){an(e,t)}))),dn(t)},pn=function(t){var e=Be(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o=e.ownerDocument;return function(t){var e=en(t);return Je(e)?I.some(e):I.none()}(De.fromDom(e)).fold((function(){return o.body.contains(e)}),(n=pn,r=rn,function(t){return n(r(t))}))},hn=function(t,e){return{left:t,top:e,translate:function(n,r){return hn(t+n,e+r)}}},gn=hn,vn=function(t,e){return void 0!==t?t:void 0!==e?e:0},yn=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?gn(n.offsetLeft,n.offsetTop):pn(t)?function(t){var e=t.getBoundingClientRect();return gn(e.left,e.top)}(e):gn(0,0)},bn=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return gn(n,r)},Cn=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},wn=function(t,e){le().browser.isSafari()&&C(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},_n=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},kn=function(t){var e=void 0===t?window:t,n=e.document,r=bn(De.fromDom(n));return function(t){var e=void 0===t?window:t;return I.from(e.visualViewport)}(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return _n(r.left,r.top,n,o)}),(function(t){return _n(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},xn=function(t){return function(e){return!!e&&e.nodeType===t}},Sn=function(t){return!!t&&!Object.getPrototypeOf(t)},Dn=xn(1),En=function(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return z(e,n)}return!1}},Nn=function(t,e){var n=e.toLowerCase().split(" ");return function(e){var r;if(Dn(e))for(r=0;r0}))},er=function(t){var e={},n=t.dom;if(Hn(n))for(var r=0;r1)for(var n=1;n=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n.setImmediate="function"==typeof e?e:function(t){var e=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[e]=!0,o((function(){s[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))})),e},n.clearImmediate="function"==typeof r?r:function(t){delete s[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)}))}(void 0,ar,sr,void 0);var ur=sr.exports.boltExport,cr=function(t){var e=I.none(),n=[],r=function(t){o()?a(t):n.push(t)},o=function(){return e.isSome()},i=function(t){H(t,a)},a=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t((function(t){o()||(e=I.some(t),i(n),n=[])})),{get:r,map:function(t){return cr((function(e){r((function(n){e(t(n))}))}))},isReady:o}},lr={nu:cr,pure:function(t){return cr((function(e){e(t)}))}},fr=function(t){setTimeout((function(){throw t}),0)},dr=function(t){var e=function(e){t().then(e,fr)};return{map:function(e){return dr((function(){return t().then(e)}))},bind:function(e){return dr((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return dr((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return lr.nu(e)},toCached:function(){var e=null;return dr((function(){return null===e&&(e=t()),e}))},toPromise:t,get:e}},mr=function(t){return dr((function(){return new ur(t)}))},pr=function(t,e){return e((function(e){var n=[],r=0;0===t.length?e([]):H(t,(function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=t.length&&e(n)}}(i))}))}))},hr=function(t){return{is:function(e){return t===e},isValue:O,isError:L,getOr:x(t),getOrThunk:x(t),getOrDie:x(t),or:function(e){return hr(t)},orThunk:function(e){return hr(t)},fold:function(e,n){return n(t)},map:function(e){return hr(e(t))},mapError:function(e){return hr(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return I.some(t)}}},gr=function(t){return{is:L,isValue:L,isError:O,getOr:S,getOrThunk:function(t){return t()},getOrDie:function(){return N(String(t))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return gr(t)},mapError:function(e){return gr(e(t))},each:_,bind:function(e){return gr(t)},exists:L,forall:O,toOptional:I.none}},vr={value:hr,error:gr,fromOption:function(t,e){return t.fold((function(){return gr(e)}),hr)}},yr=function(t){if(!p(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return H(t,(function(r,o){var i=it(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],s=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!p(s))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r0?n(r.fail.map(br)):e(r.pass.map(br))}))},unload:c,unloadAll:function(t){H(t,(function(t){c(t)}))},_setReferrerPolicy:function(t){e.referrerPolicy=t}}},Qr=function(){var t=new WeakMap;return{forElement:function(e,n){var r=en(e).dom;return I.from(t.get(r)).getOrThunk((function(){var e=Jr(r,n);return t.set(r,e),e}))}}}(),to=function(){function t(t,e){this.node=t,this.rootNode=e,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return t.prototype.current=function(){return this.node},t.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},t.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},t.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},t.prototype.findSibling=function(t,e,n,r){var o,i;if(t){if(!r&&t[e])return t[e];if(t!==this.rootNode){if(o=t[n])return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},t.prototype.findPreviousNode=function(t,e,n,r){var o,i,a;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[e];a;a=a[e])if(!a[e])return a;return o}if((i=t.parentNode)&&i!==this.rootNode)return i}},t}(),eo=function(t){var e;return function(n){return(e=e||function(t,e){for(var n={},r=0,o=t.length;r0&&function(t,e){var n=new to(t,e).prev(!1),r=new to(t,e).next(!1),o=v(n)||Yo(n,e),i=v(r)||Yo(r,e);return o&&i}(t,e)},Zo=function(t,e,n){var r=n||e;if(Dn(e)&&Xo(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)Zo(t,o[i],r);if(Dn(e)){var a=e.childNodes;1===a.length&&Xo(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Bn(t)||In(t)}(e)||Vo(e,r)||function(t){return!!Dn(t)&&t.childNodes.length>0}(e)||Go(e,r)||t.remove(e),e},Jo=xe.makeMap,Qo=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ti=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ei=/[<>&\"\']/g,ni=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,ri={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},oi={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},ii={"<":"<",">":">","&":"&",""":'"',"'":"'"},ai=function(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":oi[t]||"&#"+t.charCodeAt(0)+";"}))},li=function(t,e,n){return n=n||si,t.replace(e?Qo:ti,(function(t){return oi[t]||n[t]||t}))},fi={encodeRaw:ui,encodeAllRaw:function(t){return(""+t).replace(ei,(function(t){return oi[t]||t}))},encodeNumeric:ci,encodeNamed:li,getEncodeFunc:function(t,e){var n=ai(e)||si,r=Jo(t.replace(/\+/g,","));return r.named&&r.numeric?function(t,e){return t.replace(e?Qo:ti,(function(t){return void 0!==oi[t]?oi[t]:void 0!==n[t]?n[t]:t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"}))}:r.named?e?function(t,e){return li(t,e,n)}:li:r.numeric?ci:ui},decode:function(t){return t.replace(ni,(function(t,e){return e?(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10))>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):ri[e]||String.fromCharCode(e):ii[t]||si[t]||function(t){var e=De.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t}(t)}))}},di={},mi={},pi=xe.makeMap,hi=xe.each,gi=xe.extend,vi=xe.explode,yi=xe.inArray,bi=function(t,e){return(t=xe.trim(t))?t.split(e||" "):[]},Ci=function(t,e){var n;return t&&(n={},"string"==typeof t&&(t={"*":t}),hi(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?pi(t,/[, ]/):vi(t,/[, ]/)}))),n},wi=function(t){var e={},n={},r=[],o={},i={},a=function(e,n,r){var o=t[e];return o?o=pi(o,/[, ]/,pi(o.toUpperCase(),/[, ]/)):(o=di[e])||(o=pi(n," ",pi(n.toUpperCase()," ")),o=gi(o,r),di[e]=o),o},s=function(t){var e,n,r,o,i,a,s={},u=function(t,n,r){var o,i,a,u=function(t,e){var n,r,o={};for(n=0,r=t.length;n