@farris/ui-vue 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/package.json +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/index.esm.js +1362 -1361
- package/components/border-editor/index.umd.cjs +6 -6
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +22 -21
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +1370 -1369
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +180 -179
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/package.json +1 -1
- package/components/data-grid/index.esm.js +22 -21
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +22 -21
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +2270 -2269
- package/components/designer-canvas/index.umd.cjs +7 -7
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +22 -21
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +180 -179
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +3661 -3660
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.esm.js +1365 -1364
- package/components/external-container/index.umd.cjs +7 -7
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.esm.js +182 -181
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/index.esm.js +182 -181
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +22 -21
- package/components/flow-canvas/index.umd.cjs +7 -7
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +183 -182
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.esm.js +185 -184
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.esm.js +181 -180
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +182 -181
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/plugin/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +2810 -2810
- package/components/property-editor/index.umd.cjs +7 -7
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +180 -179
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/index.esm.js +182 -181
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.esm.js +22 -21
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/index.esm.js +22 -21
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.esm.js +939 -938
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +183 -182
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/tree-grid/index.esm.js +22 -21
- package/components/tree-grid/index.umd.cjs +7 -7
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +186 -185
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +26 -26
- package/farris.all.umd.cjs +2 -2
- package/package.json +1 -1
- package/types/property-editor/src/composition/use-initialized-value.d.ts +1 -1
package/farris.all.umd.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`):"",this.name="UnsubscriptionError",this.errors=o}});function vo(t,n){if(t){var o=t.indexOf(n);0<=o&&t.splice(o,1)}}var Bn=function(){function t(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var n,o,a,r,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var l=gn(s),p=l.next();!p.done;p=l.next()){var c=p.value;c.remove(this)}}catch(h){n={error:h}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}else s.remove(this);var f=this.initialTeardown;if(ut(f))try{f()}catch(h){i=h instanceof nr?h.errors:[h]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=gn(u),m=d.next();!m.done;m=d.next()){var g=m.value;try{ad(g)}catch(h){i=i??[],h instanceof nr?i=bo(bo([],yo(i)),yo(h.errors)):i.push(h)}}}catch(h){a={error:h}}finally{try{m&&!m.done&&(r=d.return)&&r.call(d)}finally{if(a)throw a.error}}}if(i)throw new nr(i)}},t.prototype.add=function(n){var o;if(n&&n!==this)if(this.closed)ad(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(o=this._finalizers)!==null&&o!==void 0?o:[]).push(n)}},t.prototype._hasParent=function(n){var o=this._parentage;return o===n||Array.isArray(o)&&o.includes(n)},t.prototype._addParent=function(n){var o=this._parentage;this._parentage=Array.isArray(o)?(o.push(n),o):o?[o,n]:n},t.prototype._removeParent=function(n){var o=this._parentage;o===n?this._parentage=null:Array.isArray(o)&&vo(o,n)},t.prototype.remove=function(n){var o=this._finalizers;o&&vo(o,n),n instanceof t&&n._removeParent(this)},t.EMPTY=function(){var n=new t;return n.closed=!0,n}(),t}(),nd=Bn.EMPTY;function od(t){return t instanceof Bn||t&&"closed"in t&&ut(t.remove)&&ut(t.add)&&ut(t.unsubscribe)}function ad(t){ut(t)?t():t.unsubscribe()}var rd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},id={setTimeout:function(t,n){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];return setTimeout.apply(void 0,bo([t,n],yo(o)))},clearTimeout:function(t){var n=id.delegate;return((n==null?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function sd(t){id.setTimeout(function(){throw t})}function ld(){}function xo(t){t()}var or=function(t){$t(n,t);function n(o){var a=t.call(this)||this;return a.isStopped=!1,o?(a.destination=o,od(o)&&o.add(a)):a.destination=tv,a}return n.create=function(o,a,r){return new rr(o,a,r)},n.prototype.next=function(o){this.isStopped||this._next(o)},n.prototype.error=function(o){this.isStopped||(this.isStopped=!0,this._error(o))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(o){this.destination.next(o)},n.prototype._error=function(o){try{this.destination.error(o)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Bn),Xb=Function.prototype.bind;function ar(t,n){return Xb.call(t,n)}var Jb=function(){function t(n){this.partialObserver=n}return t.prototype.next=function(n){var o=this.partialObserver;if(o.next)try{o.next(n)}catch(a){Co(a)}},t.prototype.error=function(n){var o=this.partialObserver;if(o.error)try{o.error(n)}catch(a){Co(a)}else Co(n)},t.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(o){Co(o)}},t}(),rr=function(t){$t(n,t);function n(o,a,r){var i=t.call(this)||this,s;if(ut(o)||!o)s={next:o??void 0,error:a??void 0,complete:r??void 0};else{var l;i&&rd.useDeprecatedNextContext?(l=Object.create(o),l.unsubscribe=function(){return i.unsubscribe()},s={next:o.next&&ar(o.next,l),error:o.error&&ar(o.error,l),complete:o.complete&&ar(o.complete,l)}):s=o}return i.destination=new Jb(s),i}return n}(or);function Co(t){sd(t)}function ev(t){throw t}var tv={closed:!0,next:ld,error:ev,complete:ld},ir=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function cd(t){return t}function nv(t){return t.length===0?cd:t.length===1?t[0]:function(o){return t.reduce(function(a,r){return r(a)},o)}}var vt=function(){function t(n){n&&(this._subscribe=n)}return t.prototype.lift=function(n){var o=new t;return o.source=this,o.operator=n,o},t.prototype.subscribe=function(n,o,a){var r=this,i=av(n)?n:new rr(n,o,a);return xo(function(){var s=r,l=s.operator,p=s.source;i.add(l?l.call(i,p):p?r._subscribe(i):r._trySubscribe(i))}),i},t.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(o){n.error(o)}},t.prototype.forEach=function(n,o){var a=this;return o=dd(o),new o(function(r,i){var s=new rr({next:function(l){try{n(l)}catch(p){i(p),s.unsubscribe()}},error:i,complete:r});a.subscribe(s)})},t.prototype._subscribe=function(n){var o;return(o=this.source)===null||o===void 0?void 0:o.subscribe(n)},t.prototype[ir]=function(){return this},t.prototype.pipe=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return nv(n)(this)},t.prototype.toPromise=function(n){var o=this;return n=dd(n),new n(function(a,r){var i;o.subscribe(function(s){return i=s},function(s){return r(s)},function(){return a(i)})})},t.create=function(n){return new t(n)},t}();function dd(t){var n;return(n=t??rd.Promise)!==null&&n!==void 0?n:Promise}function ov(t){return t&&ut(t.next)&&ut(t.error)&&ut(t.complete)}function av(t){return t&&t instanceof or||ov(t)&&od(t)}function rv(t){return ut(t==null?void 0:t.lift)}function wo(t){return function(n){if(rv(n))return n.lift(function(o){try{return t(o,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function sr(t,n,o,a,r){return new iv(t,n,o,a,r)}var iv=function(t){$t(n,t);function n(o,a,r,i,s,l){var p=t.call(this,o)||this;return p.onFinalize=s,p.shouldUnsubscribe=l,p._next=a?function(c){try{a(c)}catch(f){o.error(f)}}:t.prototype._next,p._error=i?function(c){try{i(c)}catch(f){o.error(f)}finally{this.unsubscribe()}}:t.prototype._error,p._complete=r?function(){try{r()}catch(c){o.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,p}return n.prototype.unsubscribe=function(){var o;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;t.prototype.unsubscribe.call(this),!a&&((o=this.onFinalize)===null||o===void 0||o.call(this))}},n}(or),sv=td(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Vo=function(t){$t(n,t);function n(){var o=t.call(this)||this;return o.closed=!1,o.currentObservers=null,o.observers=[],o.isStopped=!1,o.hasError=!1,o.thrownError=null,o}return n.prototype.lift=function(o){var a=new ud(this,this);return a.operator=o,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new sv},n.prototype.next=function(o){var a=this;xo(function(){var r,i;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var s=gn(a.currentObservers),l=s.next();!l.done;l=s.next()){var p=l.value;p.next(o)}}catch(c){r={error:c}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}})},n.prototype.error=function(o){var a=this;xo(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=o;for(var r=a.observers;r.length;)r.shift().error(o)}})},n.prototype.complete=function(){var o=this;xo(function(){if(o._throwIfClosed(),!o.isStopped){o.isStopped=!0;for(var a=o.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var o;return((o=this.observers)===null||o===void 0?void 0:o.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(o){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,o)},n.prototype._subscribe=function(o){return this._throwIfClosed(),this._checkFinalizedStatuses(o),this._innerSubscribe(o)},n.prototype._innerSubscribe=function(o){var a=this,r=this,i=r.hasError,s=r.isStopped,l=r.observers;return i||s?nd:(this.currentObservers=null,l.push(o),new Bn(function(){a.currentObservers=null,vo(l,o)}))},n.prototype._checkFinalizedStatuses=function(o){var a=this,r=a.hasError,i=a.thrownError,s=a.isStopped;r?o.error(i):s&&o.complete()},n.prototype.asObservable=function(){var o=new vt;return o.source=this,o},n.create=function(o,a){return new ud(o,a)},n}(vt),ud=function(t){$t(n,t);function n(o,a){var r=t.call(this)||this;return r.destination=o,r.source=a,r}return n.prototype.next=function(o){var a,r;(r=(a=this.destination)===null||a===void 0?void 0:a.next)===null||r===void 0||r.call(a,o)},n.prototype.error=function(o){var a,r;(r=(a=this.destination)===null||a===void 0?void 0:a.error)===null||r===void 0||r.call(a,o)},n.prototype.complete=function(){var o,a;(a=(o=this.destination)===null||o===void 0?void 0:o.complete)===null||a===void 0||a.call(o)},n.prototype._subscribe=function(o){var a,r;return(r=(a=this.source)===null||a===void 0?void 0:a.subscribe(o))!==null&&r!==void 0?r:nd},n}(Vo),fd=function(t){$t(n,t);function n(o){var a=t.call(this)||this;return a._value=o,a}return Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(o){var a=t.prototype._subscribe.call(this,o);return!a.closed&&o.next(this._value),a},n.prototype.getValue=function(){var o=this,a=o.hasError,r=o.thrownError,i=o._value;if(a)throw r;return this._throwIfClosed(),i},n.prototype.next=function(o){t.prototype.next.call(this,this._value=o)},n}(Vo),lv={now:function(){return Date.now()},delegate:void 0},cv=function(t){$t(n,t);function n(o,a){return t.call(this)||this}return n.prototype.schedule=function(o,a){return this},n}(Bn),lr={setInterval:function(t,n){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];return setInterval.apply(void 0,bo([t,n],yo(o)))},clearInterval:function(t){var n=lr.delegate;return((n==null?void 0:n.clearInterval)||clearInterval)(t)},delegate:void 0},dv=function(t){$t(n,t);function n(o,a){var r=t.call(this,o,a)||this;return r.scheduler=o,r.work=a,r.pending=!1,r}return n.prototype.schedule=function(o,a){var r;if(a===void 0&&(a=0),this.closed)return this;this.state=o;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,a)),this.pending=!0,this.delay=a,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(s,this.id,a),this},n.prototype.requestAsyncId=function(o,a,r){return r===void 0&&(r=0),lr.setInterval(o.flush.bind(o,this),r)},n.prototype.recycleAsyncId=function(o,a,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return a;a!=null&&lr.clearInterval(a)},n.prototype.execute=function(o,a){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(o,a);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},n.prototype._execute=function(o,a){var r=!1,i;try{this.work(o)}catch(s){r=!0,i=s||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),i},n.prototype.unsubscribe=function(){if(!this.closed){var o=this,a=o.id,r=o.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,vo(i,this),a!=null&&(this.id=this.recycleAsyncId(r,a,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},n}(cv),pd=function(){function t(n,o){o===void 0&&(o=t.now),this.schedulerActionCtor=n,this.now=o}return t.prototype.schedule=function(n,o,a){return o===void 0&&(o=0),new this.schedulerActionCtor(this,n).schedule(a,o)},t.now=lv.now,t}(),uv=function(t){$t(n,t);function n(o,a){a===void 0&&(a=pd.now);var r=t.call(this,o,a)||this;return r.actions=[],r._active=!1,r}return n.prototype.flush=function(o){var a=this.actions;if(this._active){a.push(o);return}var r;this._active=!0;do if(r=o.execute(o.state,o.delay))break;while(o=a.shift());if(this._active=!1,r){for(;o=a.shift();)o.unsubscribe();throw r}},n}(pd),fv=new uv(dv);function pv(t){return t&&ut(t.schedule)}function mv(t){return t[t.length-1]}function hv(t){return pv(mv(t))?t.pop():void 0}var md=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function hd(t){return ut(t==null?void 0:t.then)}function gd(t){return ut(t[ir])}function yd(t){return Symbol.asyncIterator&&ut(t==null?void 0:t[Symbol.asyncIterator])}function bd(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function gv(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var vd=gv();function xd(t){return ut(t==null?void 0:t[vd])}function Cd(t){return Kb(this,arguments,function(){var o,a,r,i;return ed(this,function(s){switch(s.label){case 0:o=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,yn(o.read())];case 3:return a=s.sent(),r=a.value,i=a.done,i?[4,yn(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,yn(r)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return o.releaseLock(),[7];case 10:return[2]}})})}function wd(t){return ut(t==null?void 0:t.getReader)}function cr(t){if(t instanceof vt)return t;if(t!=null){if(gd(t))return yv(t);if(md(t))return bv(t);if(hd(t))return vv(t);if(yd(t))return Vd(t);if(xd(t))return xv(t);if(wd(t))return Cv(t)}throw bd(t)}function yv(t){return new vt(function(n){var o=t[ir]();if(ut(o.subscribe))return o.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bv(t){return new vt(function(n){for(var o=0;o<t.length&&!n.closed;o++)n.next(t[o]);n.complete()})}function vv(t){return new vt(function(n){t.then(function(o){n.closed||(n.next(o),n.complete())},function(o){return n.error(o)}).then(null,sd)})}function xv(t){return new vt(function(n){var o,a;try{for(var r=gn(t),i=r.next();!i.done;i=r.next()){var s=i.value;if(n.next(s),n.closed)return}}catch(l){o={error:l}}finally{try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(o)throw o.error}}n.complete()})}function Vd(t){return new vt(function(n){wv(t,n).catch(function(o){return n.error(o)})})}function Cv(t){return Vd(Cd(t))}function wv(t,n){var o,a,r,i;return Zb(this,void 0,void 0,function(){var s,l;return ed(this,function(p){switch(p.label){case 0:p.trys.push([0,5,6,11]),o=Qb(t),p.label=1;case 1:return[4,o.next()];case 2:if(a=p.sent(),!!a.done)return[3,4];if(s=a.value,n.next(s),n.closed)return[2];p.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return l=p.sent(),r={error:l},[3,11];case 6:return p.trys.push([6,,9,10]),a&&!a.done&&(i=o.return)?[4,i.call(o)]:[3,8];case 7:p.sent(),p.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}function Ht(t,n,o,a,r){a===void 0&&(a=0),r===void 0&&(r=!1);var i=n.schedule(function(){o(),r?t.add(this.schedule(null,a)):this.unsubscribe()},a);if(t.add(i),!r)return i}function Nd(t,n){return n===void 0&&(n=0),wo(function(o,a){o.subscribe(sr(a,function(r){return Ht(a,t,function(){return a.next(r)},n)},function(){return Ht(a,t,function(){return a.complete()},n)},function(r){return Ht(a,t,function(){return a.error(r)},n)}))})}function Sd(t,n){return n===void 0&&(n=0),wo(function(o,a){a.add(t.schedule(function(){return o.subscribe(a)},n))})}function Vv(t,n){return cr(t).pipe(Sd(n),Nd(n))}function Nv(t,n){return cr(t).pipe(Sd(n),Nd(n))}function Sv(t,n){return new vt(function(o){var a=0;return n.schedule(function(){a===t.length?o.complete():(o.next(t[a++]),o.closed||this.schedule())})})}function Tv(t,n){return new vt(function(o){var a;return Ht(o,n,function(){a=t[vd](),Ht(o,n,function(){var r,i,s;try{r=a.next(),i=r.value,s=r.done}catch(l){o.error(l);return}s?o.complete():o.next(i)},0,!0)}),function(){return ut(a==null?void 0:a.return)&&a.return()}})}function Td(t,n){if(!t)throw new Error("Iterable cannot be null");return new vt(function(o){Ht(o,n,function(){var a=t[Symbol.asyncIterator]();Ht(o,n,function(){a.next().then(function(r){r.done?o.complete():o.next(r.value)})},0,!0)})})}function Dv(t,n){return Td(Cd(t),n)}function kv(t,n){if(t!=null){if(gd(t))return Vv(t,n);if(md(t))return Sv(t,n);if(hd(t))return Nv(t,n);if(yd(t))return Td(t,n);if(xd(t))return Tv(t,n);if(wd(t))return Dv(t,n)}throw bd(t)}function Av(t,n){return n?kv(t,n):cr(t)}function Dd(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=hv(t);return Av(t,o)}function $v(t,n){return n===void 0&&(n=fv),wo(function(o,a){var r=null,i=null,s=null,l=function(){if(r){r.unsubscribe(),r=null;var c=i;i=null,a.next(c)}};function p(){var c=s+t,f=n.now();if(f<c){r=this.schedule(void 0,c-f),a.add(r);return}l()}o.subscribe(sr(a,function(c){i=c,s=n.now(),r||(r=n.schedule(p,t),a.add(r))},function(){l(),a.complete()},void 0,function(){i=r=null}))})}function Ev(t,n){return n===void 0&&(n=cd),t=t??Bv,wo(function(o,a){var r,i=!0;o.subscribe(sr(a,function(s){var l=n(s);(i||!t(r,l))&&(i=!1,r=l,a.next(s))}))})}function Bv(t,n){return t===n}var Ke=(t=>(t.hex="hex",t.hexa="hexa",t.rgba="rgba",t.rgb="rgb",t.hsla="hsla",t.hsl="hsl",t.cmyk="cmyk",t))(Ke||{});class dr{constructor(n){P(this,"modelValue",null);P(this,"hueValue",null);P(this,"initValue",null);P(this,"valueChanged",new Vo);P(this,"presetsVisibilityChanges",new fd(!0));P(this,"initType",null);P(this,"alphaChannelVisibilityChanges",new fd(!0));P(this,"valueChanges",this.valueChanged.asObservable().pipe(Ev((n,o)=>n.toRgbaString()===o.toRgbaString())));P(this,"colorPresets",[]);const o=n[0],a=Ie.from(o);this.setValue(a),this.setHueColor(a)}setValueFrom(n,o,a){const r=Ie.from(n);return this.initValue||(this.initValue=Ie.from(n)),typeof n=="string"&&this.finOutInputType(n),this.setHueColor(r),this.setValue(r),this}setHueColor(n){(this.hueValue&&n.getHsva().hue>0||!this.hueValue)&&(this.hueValue=new Ie().setHsva(n.getHsva().hue))}get hue(){return this.hueValue}set hue(n){this.hueValue=n}setValue(n){return this.modelValue=n,this.valueChanged.next(n),this}get value(){return this.modelValue}set value(n){this.setValue(n)}reset(){let n;return this.initValue?(n=this.initValue.clone(),this.setHueColor(n)):(n=Ie.from(new J(255,0,0,1)),this.hueValue=new Ie().setHsva(n.getHsva().hue)),this.setValue(n),this}showAlphaChannel(){return this.alphaChannelVisibilityChanges.next(!0),this}finOutInputType(n){const o=n.replace(/ /g,"").toLowerCase();o[0]==="#"&&(this.initType="hex",o.length>7&&(this.initType="hexa"));const a=o.indexOf("(");switch(o.substr(0,a)){case"rgba":this.initType="rgba";break;case"rgb":this.initType="rgb";break;case"hsla":this.initType="hsla";break;case"hsl":this.initType="hsl";break;case"cmyk":this.initType="cmyk";break}}setColorPresets(n){return this.colorPresets=this.setPresets(n),this}setPresets(n){const o=[];return n.map(a=>{Array.isArray(a)?o.push(this.setPresets(a)):o.push(new Ie(a))}),o}get presets(){return this.colorPresets}hasPresets(){return this.colorPresets.length>0}}P(dr,"finOutInputType");function gt(t,n){switch(n){case Ke.hex:return t.toHexString();case Ke.hexa:return t.toHexString(!0);case Ke.rgb:return t.toRgbString();case Ke.rgba:return t.toRgbaString();case Ke.hsl:return t.toHslString();case Ke.hsla:return t.toHslaString();default:return t.toRgbaString()}}const Fv={color:{type:Object,default:""},hue:{type:Object,default:""},randomId:{type:String,default:""},allowColorNull:{type:Boolean,default:!1}},kd=e.defineComponent({name:"SvPanel",props:Fv,emits:["update:color"],setup(t,n){const o=e.ref(null),a=e.ref(null),r=e.ref(t.randomId),i=e.ref(t.allowColorNull);function s(){return t.hue?t.hue.toRgbaString():"#3f51b5"}function l(u,d){var m,g;u=Math.max(0,Math.min(u,100)),d=Math.max(0,Math.min(d,100)),o.value&&((m=o.value.style)==null||m.setProperty("top",`${100-d}%`),(g=o.value.style)==null||g.setProperty("left",`${u}%`))}function p(){const u=document.getElementById(`farris-color-picker-plus-sure-${r.value}`);u.className="btn btn-secondary";const d=document.getElementById(`farris-color-picker-plus-input-${r.value}`);d.style.borderColor="#dcdfe6"}function c({x:u,y:d,height:m,width:g}){const h=u*100/g,y=-(d*100/m)+100;l(h,y);const v=t.color==null?"transparent":t.color,b=Ie.from(v);if(p(),b!=null){const x=t.hue.getHsva(),C=b.getHsva(),w=new Ie().setHsva(x.hue,h,y,C.alpha);n.emit("update:color",w)}!b&&i.value&&n.emit("update:color",null)}function f(u){if(a.value){const{width:d,height:m,top:g,left:h}=a.value.getBoundingClientRect(),{pageX:y,pageY:v}="touches"in u?u.touches[0]:u,b=Math.max(0,Math.min(y-(h+window.pageXOffset),d)),x=Math.max(0,Math.min(v-(g+window.pageYOffset),m));c({x:b,y:x,height:m,width:d})}}return e.onMounted(()=>{const u=t.color.getHsva();l(u.saturation,u.value)}),e.watch(()=>t.color,u=>{u.getHsva()}),e.watch(()=>t.color,u=>{const d=u.getHsva();l(d.saturation,d.value)}),()=>e.createVNode("div",{class:"f-sv-panel-component",ref:a,style:{backgroundColor:s()},onMousedown:e.withModifiers(u=>f(u),["prevent"]),onTouchstart:e.withModifiers(u=>f(u),["prevent"])},[e.createVNode("div",{class:"color-svpanel__white"},null),e.createVNode("div",{class:"color-svpanel__black"},null),e.createVNode("div",{class:"color-svpanel__cursor",ref:o},[e.createVNode("div",null,null)])])}}),Iv={color:{type:Object,default:""},hue:{type:Object,default:""},allowColorNull:{type:Boolean,default:!1},onChange:{type:Function}},Ad=e.defineComponent({name:"Hue",props:Iv,emits:["update:color","update:hue"],setup(t,n){const o=e.ref(t.hue),a=e.ref(t.allowColorNull),r=[];function i(g){g.preventDefault(),l(g)}const s=e.ref(null);function l(g){if(s.value){const{width:h,height:y,top:v,left:b}=s.value.getBoundingClientRect(),{pageX:x,pageY:C}="touches"in g?g.touches[0]:g,w=Math.max(0,Math.min(x-(b+window.pageXOffset),h)),V=Math.max(0,Math.min(C-(v+window.pageYOffset),y));m({x:w,y:V,height:y,width:h})}}function p(){r.forEach(g=>g()),r.length=0}function c(g){i(g),document.addEventListener("mouseup",p),document.addEventListener("touchend",p),document.addEventListener("touchmove",i)}const f=g=>{c(g),g.stopPropagation()};e.onMounted(()=>{document.querySelectorAll(".f-hue-component").forEach(y=>{y.addEventListener("mousedown",f),y.addEventListener("touchstart",f)});const h=t.color.getHsva();d(h.hue)});const u=e.ref(null);function d(g){var v;const h=Math.max(0,Math.min(g/360*100,100));u.value&&((v=u.value.style)==null||v.setProperty("top",`${h}%`))}function m({x:g,y:h,height:y,width:v}){const b=h/y*360;d(b);const x=t.color.getHsva(),C=new Ie().setHsva(b,x.saturation,x.value,x.alpha),w=new Ie().setHsva(b,100,100,x.alpha);(t.color!=null||t.color==null&&a.value)&&(n.emit("update:hue",w),n.emit("update:color",C))}return e.watch(o,g=>{const h=g.getHsva();d(h.hue)}),e.watch(()=>t.color,g=>{const h=g.getHsva();d(h.hue)}),()=>e.createVNode("div",{class:"f-hue-component",ref:s,onMousedown:e.withModifiers(g=>l(g),["prevent"]),onTouchstart:e.withModifiers(g=>l(g),["prevent"])},[e.createVNode("div",{class:"color-hue-slider__bar"},null),e.createVNode("div",{class:"color-hue-slider__thumb",ref:u},null)])}}),Mv={color:{type:Object,default:""},randomId:{type:String,default:""},allowColorNull:{type:Boolean,default:!1}},$d=e.defineComponent({name:"Alpha",props:Mv,emits:["update:color"],setup(t,n){const o=e.ref(null),a=e.ref(null),r=e.ref(t.randomId),i=e.ref(t.allowColorNull),s=f=>{var m;const u=Math.max(0,Math.min(f*100,100));a.value&&((m=a.value.style)==null||m.setProperty("left",`${u}%`))};function l(f){if(o.value){const{width:u,height:d,top:m,left:g}=o.value.getBoundingClientRect(),{pageX:h,pageY:y}="touches"in f?f.touches[0]:f,v=Math.max(0,Math.min(h-(g+window.pageXOffset),u)),b=Math.max(0,Math.min(y-(m+window.pageYOffset),d));c({x:v,y:b,height:d,width:u})}}function p(){const f=document.getElementById(`farris-color-picker-plus-sure-${r.value}`);f.className="btn btn-secondary";const u=document.getElementById(`farris-color-picker-plus-input-${r.value}`);u.style.borderColor="#dcdfe6"}const c=({x:f,width:u})=>{const d=f/u;s(d),p();const m=t.color.getHsva(),g=new Ie().setHsva(m.hue,m.saturation,m.value,d);t.color!=null?n.emit("update:color",g):t.color==null&&i.value&&n.emit("update:color",null)};return e.onMounted(()=>{const f=t.color.getHsva();s(f.alpha)}),e.watch(()=>t.color,f=>{const u=f.getHsva();s(u.alpha)}),()=>e.createVNode("div",{class:"f-alpha-component",ref:o,onMousedown:e.withModifiers(f=>l(f),["prevent"]),onTouchstart:e.withModifiers(f=>l(f),["prevent"])},[e.createVNode("div",{class:"color-alpha-slider__bar"},[e.createTextVNode(" ")]),e.createVNode("div",{class:"color-alpha-slider__thumb",ref:a},null)])}}),Ov={color:{type:Object,default:""},hue:{type:Object,default:""},colorPresets:{type:Object,default:""},randomId:{type:String,default:""}},Ed=e.defineComponent({name:"Preset",props:Ov,emits:["update:hue","update:color"],setup(t,n){const o=e.ref(new Ie),a=e.ref(t.colorPresets),r=e.ref(t.randomId);function i(){const c=document.getElementById(`farris-color-picker-plus-sure-${r.value}`);c.className="btn btn-secondary";const f=document.getElementById(`farris-color-picker-plus-input-${r.value}`);f.style.borderColor="#dcdfe6"}function s(c){i();const f=c.getRgba(),u=c.getHsva(),d=new Ie().setRgba(f.red,f.green,f.blue,f.alpha),m=new Ie().setHsva(u.hue);o.value=c,n.emit("update:hue",m),n.emit("update:color",d)}function l(c){const f=o.value.getRgba().toString(),u=o.value.getHsva().toString(),d=c.getRgba().toString()===f&&c.getHsva().toString()===u;return{"color-preset__color-selector":d,selected:d}}function p(c,f){return e.createVNode("div",{class:"color-preset__color-selector"},[e.createVNode("div",{key:f,class:l(c),style:{backgroundColor:c.toRgbString()},onClick:()=>s(c)},null)])}return()=>e.createVNode("div",{class:"f-preset-component"},[e.createVNode("div",{class:"color-preset__colors"},[a.value.map((c,f)=>p(c,f))])])}}),No=e.defineComponent({name:"FColorPicker",props:Xa,emits:["valueChanged","activeChange","update:color","update:hue"],setup(t,n){const o=e.ref(new Ie(t.color)),a=e.ref(t.color),r=e.ref(t.disabled),i=e.ref(t.color),s=e.ref(t.allowColorNull),l=e.ref(t.presets),p=e.ref(!1),c=e.ref(!1),f=e.ref(!1),u=e.ref("HEX"),d=Math.floor(Math.random()*1e3).toString();let m=-1,g,h=new dr("#000000");const y=e.ref(t.color);let v,b;const x=e.ref(null),C=e.ref(null),w=e.ref(null);let V=e.computed(()=>!g&&h&&h.initType?h.initType:g);const N=e.computed({get(){return g&&a.value!==null?(Y(g),gt(new Ie(a.value),Ke[g])):a.value},set(q){q!==null&&(H(q),M(q))}}),S=e.ref(N.value),D=e.computed(()=>m>-1),k=e.computed(()=>l.value.length>0),A=e.computed(()=>({"background-color":i.value})),$=e.computed(()=>c.value&&p.value?"display:flex":"display:none"),T=[{text:"HEX",type:Ke.hex},{text:"RGBA",type:Ke.rgba}];function E(){const q=document.getElementById("farris-color-picker-panel");q.id=`farris-color-picker-panel-${d}`;const j=document.getElementById("farris-color-picker-plus-sure");j.id=`farris-color-picker-plus-sure-${d}`;const Z=document.getElementById("farris-color-picker-plus-input");Z.id=`farris-color-picker-plus-input-${d}`,b=document.getElementById(`farris-color-picker-plus-sure-${d}`),v=document.getElementById(`farris-color-picker-panel-${d}`),v.className="color-picker-panel disabled"}function B(){if(!s.value&&!a.value){document.getElementById(`farris-color-picker-plus-sure-${d}`).classList.toggle("disabled");const j=document.getElementById(`farris-color-picker-plus-input-${d}`);j.style.borderColor="red"}}function I(){a.value&&(H(a.value),!a.value&&s.value||(a.value=gt(new Ie(a.value),Ke[V.value])),S.value=N.value),O(Y(h.initType))}function F(){a.value&&H(a.value),h.hasPresets()||h.setColorPresets(l.value),a.value?i.value=gt(new Ie(a.value),Ke[V.value]):!a.value&&s.value&&(i.value=null)}function R(){h.valueChanges.subscribe(q=>{const j=gt(q,Ke[g||h.initType]);a.value=j})}function O(q){u.value=T[q].text}function W(){var q;c.value=!!(g!=null&&g.includes("a")||(q=h.initType)!=null&&q.includes("a"))}e.onBeforeMount(()=>{h.setColorPresets(l.value||["#eaecf3"])}),e.onMounted(()=>{E(),B(),I(),F()}),e.watch(u,()=>{R(),N.value=gt(new Ie(a.value),Ke[g||h.initType]),o.value=new Ie(N.value),W()}),e.watch(a,q=>{gt(h.value,h.initType)!==q&&q!==null&&H(q),O(Y(h.initType))}),e.watch(o,q=>{a.value=gt(q,Ke[g||h.initType]),H(a.value),N.value=a.value});function M(q){const j=document.getElementById(`farris-color-picker-plus-input-${d}`);(q==""||q==null||q==null)&&!s.value?(a.value=null,j.style.borderColor="red",b.className="btn btn-secondary disabled"):(j.style.borderColor="#dcdfe6",b.className="btn btn-secondary")}function _(q){var j,Z;if(q==null||q.stopPropagation(),s.value){i.value=(a==null?void 0:a.value)??null;const U={elementValue:i};n.emit("valueChanged",U),G()}if(!s.value&&!(N.value==null||N.value==null||N.value=="")){(Z=(j=x.value)==null?void 0:j.style)==null||Z.setProperty("background",a.value),f.value=!0,i.value=a.value;const U={elementValue:i};n.emit("valueChanged",U),G()}!y.value&&!a.value&&!f.value&&s&&G(),M(a.value),N.value=a.value,b.classList.contains("disabled")||(S.value=a.value,p.value=!1)}function H(q){h==null||h.setValueFrom(q,d,s.value)}function L(q){v=document.getElementById(`farris-color-picker-panel-${d}`);const j=v.className=="color-picker-panel";r.value||j||(p.value=!0,v.classList.toggle("disabled"),B(),H(a.value),q.stopPropagation())}function G(){v=document.getElementById(`farris-color-picker-panel-${d}`),v.className="color-picker-panel disabled"}function Y(q){const j=T.findIndex(Z=>Z.type===q);return m=j,j}function z(q){if(!b.classList.contains("disabled")){const j=T.length;m=(j+m+(q==="up"?1:-1))%j,g=T[m].type,O(m),H(a.value)}}return()=>e.createVNode("div",{class:"f-color-picker-component",ref:C},[e.createVNode("div",{class:["color-picker-panel",{disabled:r.value}],id:"farris-color-picker-panel",ref:w,onClick:q=>q.stopPropagation(),style:"top:30px"},[e.createVNode("div",{class:"color-picker-main"},[e.createVNode(Ad,{hue:h.hue,"onUpdate:hue":q=>h.hue=q,allowColorNull:s.value,color:o.value,"onUpdate:color":q=>o.value=q},null),e.createVNode(kd,{randomId:d,hue:h.hue,"onUpdate:hue":q=>h.hue=q,allowColorNull:s.value,color:o.value,"onUpdate:color":q=>o.value=q},null)]),e.createVNode($d,{style:$.value,randomId:d,allowColorNull:s.value,color:o.value,"onUpdate:color":q=>o.value=q},null),e.createVNode("div",{class:"input-btn",style:"display:flex;align-items: center;"},[e.withDirectives(e.createVNode("span",{style:"width:40px;margin-right:10px;"},[u.value]),[[e.vShow,k]]),e.withDirectives(e.createVNode("input",{type:"text",title:"color-picker-plus",id:"farris-color-picker-plus-input","onUpdate:modelValue":q=>N.value=q,style:"float:none"},null),[[e.vModelText,N.value]]),e.withDirectives(e.createVNode("div",{class:"type-icon-btn-wrapper",style:"cursor:pointer"},[e.createVNode("span",{class:"f-icon f-icon-arrow-60-up type-icon-btn",onClick:()=>z("up")},null),e.createVNode("span",{class:"f-icon f-icon-arrow-60-down type-icon-btn",onClick:()=>z("down")},null)]),[[e.vShow,k]]),e.createVNode("div",{class:"input-btn"},[e.createVNode("button",{id:"farris-color-picker-plus-sure",class:"btn btn-secondary",onClick:q=>_(q)},[e.createTextVNode("确定")])])]),e.withDirectives(e.createVNode(Ed,{color:o.value,"onUpdate:color":q=>o.value=q,hue:h.hue,"onUpdate:hue":q=>h.hue=q,randomId:d,colorPresets:h.presets},null),[[e.vShow,D]])]),e.createVNode("div",{class:"color-picker-wrapper"},[e.createVNode("input",{title:"color-picker-input",type:"text",class:"color-picker-input form-control",value:S.value,readonly:r.value,onClick:q=>q.stopPropagation()},null),e.createVNode("div",{class:"color-picker-trigger",onClick:L},[e.createVNode("div",{class:"color-picker-trigger-inner"},[e.createVNode("div",{style:A.value},null)])])])])}}),Pv=e.defineComponent({name:"FColorPickerDesign",props:Xa,emits:["valueChanged","activeChange","update:color","update:hue"],setup(t,n){const o=e.ref(new Ie(t.color)),a=e.ref(t.color),r=e.ref(t.disabled),i=e.ref(t.color),s=e.ref(t.allowColorNull),l=e.ref(t.presets),p=e.ref(!1),c=e.ref(!1),f=e.ref(!1),u=e.ref("HEX"),d=Math.floor(Math.random()*1e3).toString();let m=-1,g,h=new dr("#000000");const y=e.ref(t.color);let v,b;const x=e.ref(null),C=e.ref(null),w=e.ref(),V=e.inject("design-item-context"),N=ye(w,V);e.onMounted(()=>{w.value.componentInstance=N}),n.expose(N.value);let S=e.computed(()=>!g&&h&&h.initType?h.initType:g);const D=e.computed({get(){return g&&a.value!==null?(z(g),gt(new Ie(a.value),Ke[g])):a.value},set(j){j!==null&&(G(j),H(j))}}),k=e.ref(D.value),A=e.computed(()=>m>-1),$=e.computed(()=>l.value.length>0),T=e.computed(()=>({"background-color":i.value})),E=e.computed(()=>c.value&&p.value?"display:flex":"display:none"),B=[{text:"HEX",type:Ke.hex},{text:"RGBA",type:Ke.rgba}];function I(){const j=document.getElementById("farris-color-picker-panel");j.id=`farris-color-picker-panel-${d}`;const Z=document.getElementById("farris-color-picker-plus-sure");Z.id=`farris-color-picker-plus-sure-${d}`;const U=document.getElementById("farris-color-picker-plus-input");U.id=`farris-color-picker-plus-input-${d}`,b=document.getElementById(`farris-color-picker-plus-sure-${d}`),v=document.getElementById(`farris-color-picker-panel-${d}`),v.className="color-picker-panel disabled"}function F(){if(!s.value&&!a.value){document.getElementById(`farris-color-picker-plus-sure-${d}`).classList.toggle("disabled");const Z=document.getElementById(`farris-color-picker-plus-input-${d}`);Z.style.borderColor="red"}}function R(){a.value&&(G(a.value),!a.value&&s.value||(a.value=gt(new Ie(a.value),Ke[S.value])),k.value=D.value),M(z(h.initType))}function O(){a.value&&G(a.value),h.hasPresets()||h.setColorPresets(l.value),a.value?i.value=gt(new Ie(a.value),Ke[S.value]):!a.value&&s.value&&(i.value=null)}function W(){h.valueChanges.subscribe(j=>{const Z=gt(j,Ke[g||h.initType]);a.value=Z})}function M(j){u.value=B[j].text}function _(){var j;c.value=!!(g!=null&&g.includes("a")||(j=h.initType)!=null&&j.includes("a"))}e.onBeforeMount(()=>{h.setColorPresets(l.value||["#eaecf3"])}),e.onMounted(()=>{I(),F(),R(),O()}),e.watch(u,()=>{W(),D.value=gt(new Ie(a.value),Ke[g||h.initType]),o.value=new Ie(D.value),_()}),e.watch(a,j=>{gt(h.value,h.initType)!==j&&j!==null&&G(j),M(z(h.initType))}),e.watch(o,j=>{a.value=gt(j,Ke[g||h.initType]),G(a.value),D.value=a.value});function H(j){const Z=document.getElementById(`farris-color-picker-plus-input-${d}`);(j==""||j==null||j==null)&&!s.value?(a.value=null,Z.style.borderColor="red",b.className="btn btn-secondary disabled"):(Z.style.borderColor="#dcdfe6",b.className="btn btn-secondary")}function L(){var j,Z;if(s.value){i.value=(a==null?void 0:a.value)??null;const U={elementValue:i};n.emit("valueChanged",U),v.classList.toggle("disabled")}if(!s.value&&!(D.value==null||D.value==null||D.value=="")){(Z=(j=x.value)==null?void 0:j.style)==null||Z.setProperty("background",a.value),f.value=!0,i.value=a.value;const U={elementValue:i};n.emit("valueChanged",U),v.classList.toggle("disabled")}!y.value&&!a.value&&!f.value&&s&&v.classList.toggle("disabled"),H(a.value),D.value=a.value,b.classList.contains("disabled")||(k.value=a.value,p.value=!1)}function G(j){h==null||h.setValueFrom(j,d,s.value)}function Y(j){r.value||(p.value=!0,v.classList.toggle("disabled"),F(),G(a.value))}function z(j){const Z=B.findIndex(U=>U.type===j);return m=Z,Z}function q(j){if(!b.classList.contains("disabled")){const Z=B.length;m=(Z+m+(j==="up"?1:-1))%Z,g=B[m].type,M(m),G(a.value)}}return()=>e.createVNode("div",{class:"f-color-picker-component",ref:w},[e.createVNode("div",{class:["color-picker-panel",{disabled:r.value}],id:"farris-color-picker-panel",ref:C,onClick:j=>j.stopPropagation,style:"top:30px"},[e.createVNode("div",{class:"color-picker-main"},[e.createVNode(Ad,{hue:h.hue,"onUpdate:hue":j=>h.hue=j,allowColorNull:s.value,color:o.value,"onUpdate:color":j=>o.value=j},null),e.createVNode(kd,{randomId:d,hue:h.hue,"onUpdate:hue":j=>h.hue=j,allowColorNull:s.value,color:o.value,"onUpdate:color":j=>o.value=j},null)]),e.createVNode($d,{style:E.value,randomId:d,allowColorNull:s.value,color:o.value,"onUpdate:color":j=>o.value=j},null),e.createVNode("div",{class:"input-btn",style:"display:flex;align-items: center;"},[e.withDirectives(e.createVNode("span",{style:"width:40px;margin-right:10px;"},[u.value]),[[e.vShow,$]]),e.withDirectives(e.createVNode("input",{type:"text",id:"farris-color-picker-plus-input","onUpdate:modelValue":j=>D.value=j,style:"float:none"},null),[[e.vModelText,D.value]]),e.withDirectives(e.createVNode("div",{class:"type-icon-btn-wrapper",style:"cursor:pointer"},[e.createVNode("span",{class:"f-icon f-icon-arrow-60-up type-icon-btn",onClick:()=>q("up")},null),e.createVNode("span",{class:"f-icon f-icon-arrow-60-down type-icon-btn",onClick:()=>q("down")},null)]),[[e.vShow,$]]),e.createVNode("div",{class:"input-btn"},[e.createVNode("button",{id:"farris-color-picker-plus-sure",class:"btn btn-secondary",onClick:L},[e.createTextVNode("确定")])])]),e.withDirectives(e.createVNode(Ed,{color:o.value,"onUpdate:color":j=>o.value=j,colorPresets:h.presets,hue:h.hue,"onUpdate:hue":j=>h.hue=j,randomId:d},null),[[e.vShow,A]])]),e.createVNode("div",{class:"color-picker-wrapper"},[e.createVNode("input",{type:"text",class:"color-picker-input form-control",value:k.value,readonly:r.value,onClick:j=>j.stopPropagation()},null),e.createVNode("div",{class:"color-picker-trigger",onClick:Y},[e.createVNode("div",{class:"color-picker-trigger-inner"},[e.createVNode("div",{style:T.value},null)])])])])}}),Bd={install(t){t.component(No.name,No)},register(t,n,o){t["color-picker"]=No,n["color-picker"]=Jc},registerDesigner(t,n,o){t["color-picker"]=Pv,n["color-picker"]=Jc}},_v=new Map([["appearance",ge]]),Rv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/content-container.schema.json",title:"content-container",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Section",type:"string"},type:{description:"The type string of Section component",type:"string",default:"content-container"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},Lv={title:"content-container",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"container",enum:[]}}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}},isScrollspyContainer:{description:"是否为被监听页面滚动的容器",title:"被监听滚动的容器",type:"boolean",defaultValue:!1},scrollOffset:{description:"滚动时每个节点的偏移量",title:"节点偏移量(px)",type:"number",visible:!0,decimals:0,min:0,defaultValue:0},isScrollCollapsibleArea:{description:"是否为滚动收折父容器",title:"滚动收折父容器",type:"boolean",defaultValue:!1,readonly:!1},isScrollArea:{description:"是否为滚动收折父容器下的滚动区域",title:"滚动收折父容器下的滚动区域",type:"boolean",default:!1,readonly:!0}}}}};function Hv(t,n,o){return n}const ur={customClass:{type:String,default:""}},Fd=me(ur,Rv,_v,Hv,Lv),fr=e.defineComponent({name:"FContentContainer",props:ur,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}});function jv(t,n){const o=ln(),a=e.ref(!1),r=e.ref(!1);let i=!0,s=!1,l,p=!1;function c(x){return l&&l.componentClassList&&l.componentClassList.includes("f-form-layout")&&l.componentClassList.includes("farris-form")?x.sourceType==="control"&&x.controlCategory==="input"||x.sourceType==="move"&&x.controlType==="form-group":!0}function f(x){return!(!Rt().basalDragulaRuleForContainer(x)||!i||!c(x))}function u(){a.value=!1,r.value=!1;const x=t,C=x.appearance&&x.appearance.class||"",w=C.split(" "),V=x.contents||[],N=V.length?V[0]:null,S=N&&N.appearance?N.appearance.class:"",D=S?S.split(" "):[],k=V.length?V.reduce((F,R)=>{const O=R&&R.appearance?R.appearance.class:"",W=O?O.split(" "):[];return F.push(...W),F},[]):[],A=n,$=A&&A.appearance&&A.appearance.class||"",T=$?$.split(" "):[];l={componentClass:C,componentClassList:w,childContents:V,firstChildContent:N,firstChildClass:S,firstChildClassList:D,parent:A,parentClass:$,parentClassList:T,children:V,childrenClassList:k};const{canAccept:E,fixed:B,hidePadding:I}=o.getRuleValue(w[0],l);return i=E,s=I,p=B,!0}function d(x){e.nextTick()}function m(){return t.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function g(x,C){const w=t;if((w.appearance&&w.appearance.class||"").split(" ").includes("f-form-layout")){const{label:S}=x,D=lt("form-group");return D.editor=C,D.label=S,D}return C}function h(x,C,w){const V=t;if((V.appearance&&V.appearance.class||"").split(" ").includes("f-form-layout")){const D=String(x.innerText),k=lt("form-group");return k.editor=w,k.label=D,k}return w}function y(){return!p}function v(){return!p}function b(){return s}return{canAccepts:f,resolveComponentContext:u,getStyles:m,onAcceptNewChildElement:h,onAcceptMovedChildElement:d,onResolveNewComponentSchema:g,triggerBelongedComponentToMoveWhenMoved:a,triggerBelongedComponentToDeleteWhenDeleted:r,checkCanMoveComponent:y,checkCanDeleteComponent:v,hideNestedPaddingInDesginerView:b}}const Wv=e.defineComponent({name:"FContentContainerDesign",props:ur,emits:[],setup(t,n){var s;const o=e.ref(),a=e.inject("design-item-context"),r=jv(a.schema,(s=a.parent)==null?void 0:s.schema),i=ye(o,a,r);return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{ref:o,class:"drag-container","data-dragref":`${a.schema.id}-container`},[n.slots.default&&n.slots.default()])}}),Id={install(t){t.component(fr.name,fr)},register(t,n,o){t["content-container"]=fr,n["content-container"]=Fd},registerDesigner(t,n,o){t["content-container"]=Wv,n["content-container"]=Fd}},So=["日","一","二","三","四","五","六"];var yt=(t=>(t[t.previous=1]="previous",t[t.current=2]="current",t[t.next=3]="next",t))(yt||{});const qv={dates:{Type:Array,default:[]},daysInWeek:{Type:Array,default:So},enableKeyboadNavigate:{Type:Boolean,default:!0},enableMarkCurrent:{Type:Boolean,default:!0},enablePeriod:{Type:Boolean,default:!1},firstDayOfTheWeek:{Type:Boolean,default:"Sun."},selected:{Type:Object,default:null},selectedPeriod:{Type:Object,default:null},selectedWeek:{Type:Object,default:null},selectMode:{Type:String,default:"day"},showWeekNumber:{Type:Boolean,default:!1},weekTitle:{Type:String,default:"Week"}};var Nt=(t=>(t[t.enter=13]="enter",t[t.esc=27]="esc",t[t.space=32]="space",t[t.leftArrow=37]="leftArrow",t[t.upArrow=38]="upArrow",t[t.rightArrow=39]="rightArrow",t[t.downArrow=40]="downArrow",t[t.tab=9]="tab",t[t.shift=16]="shift",t))(Nt||{});function pr(){function t(n){const o=n.key||n.keyCode;return o==="Enter"||o===13?13:o==="Escape"||o===27?27:o===" "||o===32?32:o==="ArrowLeft"||o===37?37:o==="ArrowUp"||o===38?38:o==="ArrowRight"||o===39?39:o==="ArrowDown"||o===40?40:o==="Tab"||o===9?9:o==="Shift"||o===16?16:-1}return{getKeyCodeFromEvent:t}}function jt(){function t(){return{year:0,month:0,day:0}}function n(f){return new Date(f.year||0,f.month?f.month-1:0,f.day||0,f.hour?f.hour:0,f.minute?f.minute:0,f.second?f.second:0,0)}function o(f){const u=new Date;return f.year||(f.year=u.getFullYear()),f.month||(f.month=u.getMonth()+1),f.day||(f.day=1),new Date(f.year,f.month-1,f.day,f.hour?f.hour:0,f.minute?f.minute:0,f.second?f.second:0,0)}function a(f){return new Date(f.year||1,(f.month||1)-1,f.day,f.hour?f.hour:0,f.minute?f.minute:0,f.second?f.second:0,0).getDay()}function r(f){return So.indexOf(f)}function i(f){return n(f).getTime()}function s(f){return Math.round(i(f)/1e3)}function l(f,u,d){const m=i(u),g=i(d),h=i(f);return g-h>h-m?u:d}function p(){const f=new Date;return{year:f.getFullYear(),month:f.getMonth()+1,day:f.getDate(),hour:f.getHours(),minute:f.getMinutes(),second:f.getSeconds()}}function c(f,u){const d=u.match(/[^(DdMmYy)]{1,}/g),m={};if(d){let g=d[0];d[0]!==d[1]&&(g=d[0]+d[1],d[2]&&d[1]!==d[2]&&(g+=d[2]));const h=new RegExp("["+g+"]"),y=f.split(h),v=u.split(h);for(let b=0;b<v.length;b++)v[b].indexOf("yyyy")!==-1&&(m.year=Number(y[b])),v[b].indexOf("M")!==-1&&(m.month=Number(y[b]||"1")),v[b].indexOf("d")!==-1&&(m.day=Number(y[b]||"1"))}else{const g=(u+"").indexOf("yyyy"),h=(u+"").indexOf("MM"),y=(u+"").indexOf("dd");if(g>=0){const v=f.substring(g,g+4);m.year=Number(v)}h>=0&&(m.month=Number(f.substring(h,h+2)||"1")),y>=0&&(m.day=Number(f.substring(y,y+2)||"01"))}return m}return{emptyDate:t,getDate:n,getDate2:o,getDayNumber:a,getEpocTime:s,getNearDate:l,getWeekdayIndex:r,getTimeInMilliseconds:i,getToday:p,getDateObject:c}}function Fn(){const{getTimeInMilliseconds:t}=jt();function n(u){return u&&u.year!==0&&u.month!==0&&u.day!==0}function o(u){return u&&u.year!==0&&u.month!==0}function a(u){return u&&u.year!==0}function r(u,d){return t(u)<t(d)}function i(u,d){return t(u)<=t(d)}function s(u,d){return t(u)===t(d)}function l(u,d){const m=t(d);return t(u.from)===m||t(u.to)===m}function p(u,d){return!d||!n(d.to)||!n(d.from)?!1:i(d.from,u)&&i(u,d.to)}function c(u,d){return n(d)&&t(u)>=t(d)}function f(u,d){return n(d)&&t(u)<=t(d)}return{isDateEarlier:r,equal:s,inPeriod:p,isPoint:l,equalOrEarlier:i,isInitializedDate:n,isInitializedMonth:o,isInitializedYear:a,isMonthDisabledByDisableSince:c,isMonthDisabledByDisableUntil:f}}const mr=e.defineComponent({name:"FDatePickerCalendarView",props:qv,emits:["click","clickWeek","keyDown","mouseEnter","mouseLeave"],setup(t,n){const o=e.ref(t.dates),a=e.ref(t.daysInWeek),r=e.ref(t.enableKeyboadNavigate),i=e.ref(t.enableMarkCurrent),s=e.ref(t.enablePeriod),l=e.ref(t.firstDayOfTheWeek),p=e.ref(t.selected),c=e.ref(t.selectedPeriod),f=e.ref(t.selectedWeek),u=e.ref(t.selectMode),d=e.ref(t.showWeekNumber),m=e.ref(t.weekTitle),g=e.computed(()=>d.value&&l.value==="Mon");e.watch(()=>t.dates,()=>{o.value=t.dates}),e.watch(()=>t.selected,()=>{p.value=t.selected});const{equal:h,inPeriod:y,isInitializedDate:v,equalOrEarlier:b,isPoint:x}=Fn(),{getKeyCodeFromEvent:C}=pr(),w=F=>{const R=!!f.value&&F.numberInTheYear===f.value.numberInTheYear&&F.year===f.value.year;return{"f-datepicker-selectWeek":u.value==="week","f-datepicker-selectedWeek":u.value==="week"&&R}},V=e.computed(()=>d.value&&l.value==="Mon");function N(F){return y(F,c.value)}function S(F){return!!c.value&&x(c.value,F)}function D(F){return!!p.value&&h({year:p.value.year,month:p.value.month,day:p.value.day},F)}const k=(F,R,O)=>{const W=u.value!=="week"&&F.tag===yt.current&&(s.value&&N(F.date)&&!S(F.date)||F.range),M=F.tag===yt.previous||F.tag===yt.next,_={"f-datepicker-range":W,"f-datepicker-no-currmonth":M,"f-datepicker-disabled":F.disable,"f-datepicker-singledate":!F.disable},H=`d_${R}_${O}`;return _[H]=!0,_},A=F=>{const R=u.value!=="week"&&F.tag===yt.current&&(!s.value&&D(F.date)||s.value&&S(F.date)),O=F.isCurrent&&i.value,W=F.highlight&&(F.tag===yt.previous||F.tag===yt.next||F.disable);return{"f-datepicker-date":!0,"f-datepicker-selected":R,"f-datepicker-current":O,"f-datepicker-opacity":W,"f-datepicker-highlight":F.highlight,"f-datepicker-disabled":F.disable}};function $(F,R){R.disable||u.value==="week"||(F.stopPropagation(),n.emit("click",R.date))}function T(F,R){u.value==="week"&&(F.stopPropagation(),n.emit("clickWeek",R))}function E(F,R){const O=C(F);O!==Nt.tab&&(F.preventDefault(),O===Nt.enter||O===Nt.space?$(F,R):r.value&&n.emit("keyDown",R.date))}function B(F){c.value&&v(c.value.from)&&!v(c.value.to)&&(o.value.forEach(R=>{R.days.forEach(O=>{O.range=!!c.value&&(b(c.value.from,O.date)&&b(O.date,F.date)||b(O.date,c.value.from)&&b(F.date,O.date))})}),n.emit("mouseEnter",F.date))}function I(){o.value.forEach(F=>{F.days.forEach(R=>{R.range=!1})}),n.emit("mouseLeave")}return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-datepicker-table-wrapper"},[e.createVNode("table",{class:"f-datepicker-table",cellpadding:"0"},[e.createVNode("thead",null,[e.createVNode("tr",null,[g.value&&e.createVNode("th",{class:"f-datepicker-weeknbr-title"},[m.value]),a.value&&a.value.map(F=>e.createVNode("th",{scope:"col",style:"padding-bottom: 8px;padding-top: 4px"},[F]))])]),e.createVNode("tbody",null,[o.value&&o.value.map((F,R)=>e.createVNode("tr",{class:w(F),onClick:O=>T(O,F)},[V.value&&e.createVNode("td",{class:"f-datepicker-weeknbr"},[e.createVNode("div",{class:"f-datepicker-date"},[F.numberInTheYear])]),F.days&&F.days.map((O,W)=>e.createVNode("td",{id:`d_${R}_${W}`,tabindex:"0",class:k(O,R,W),onClick:M=>$(M,O),onKeydown:M=>E(M,O),onMouseenter:()=>B(O),onMouseleave:()=>I()},[O.marked&&O.marked.marked&&e.createVNode("span",{class:"f-datepicker-markdate",style:{"background-color":O.marked.color}},null),e.createVNode("div",{class:A(O)},[O.date.day])]))]))])])])])}}),zv={activeMonth:{type:Object,require:!0},ariaLabelPrevMonth:{type:String,default:""},ariaLabelNextMonth:{type:String,default:""},dateFormat:{type:String,default:"yyyy-MM-dd"},disablePrePage:{type:Boolean,default:!1},disablePreRecord:{type:Boolean,default:!1},disableNextRecord:{type:Boolean,default:!1},disableNextPage:{type:Boolean,default:!1},years:{type:Array,default:[[{}]]},selectingMonth:{type:Boolean,default:!1},selectingYear:{type:Boolean,default:!1},selectMode:{type:String,default:"day"}},hr=e.defineComponent({name:"FDatePickerCalendarNavbar",props:zv,emits:["clickMonth","clickYear","prePage","preRecord","nextRecord","nextPage"],setup(t,n){return()=>{const o=e.ref(t.ariaLabelPrevMonth),a=e.ref(t.ariaLabelNextMonth),r=e.ref(t.dateFormat),i=e.ref(t.disablePrePage),s=e.ref(t.disablePreRecord),l=e.ref(t.disableNextRecord),p=e.ref(t.disableNextPage),c=e.ref(t.activeMonth),f=e.ref(t.years),u=e.ref(t.selectingMonth),d=e.ref(t.selectingYear),m=e.ref(t.selectMode),g=e.ref(!0),h=e.ref(!0);e.watch(()=>t.activeMonth,()=>{var F,R,O,W;c.value={month:(F=t.activeMonth)==null?void 0:F.month,year:(R=t.activeMonth)==null?void 0:R.year,displayTextOfMonth:(O=t.activeMonth)==null?void 0:O.displayTextOfMonth,displayTextOfYear:(W=t.activeMonth)==null?void 0:W.displayTextOfMonth}});const y=e.computed(()=>({"f-datepicker-header":!0,monthYearSelBarBorder:u.value||d.value})),v=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":i.value})),b=e.computed(()=>!u.value&&!d.value),x=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":s.value})),C=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":l.value})),w=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-header-btn-disabled":p.value})),V=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-yearLabel":g.value,"f-datepicker-labelBtnNotEdit":!g.value})),N=e.computed(()=>({"f-datepicker-header-btn":!0,"f-datepicker-monthLabel":h.value,"f-datepicker-labelBtnNotEdit":!h.value})),S=e.computed(()=>{const F=r.value?r.value.indexOf("yyyy"):0,R=r.value?r.value.indexOf("MM"):0;return F>R?"MM-yyyy":"yyyy-MM"});function D(F){F.stopPropagation(),n.emit("prePage")}function k(F){F.stopPropagation(),n.emit("preRecord")}function A(F){F.stopPropagation(),n.emit("clickYear")}function $(F){F.stopPropagation(),n.emit("clickMonth")}function T(F){F.stopPropagation(),n.emit("nextRecord")}function E(F){F.stopPropagation(),n.emit("nextPage")}function B(){return e.createVNode("button",{type:"button",class:V.value,onClick:F=>{g.value&&A(F)},tabindex:g.value?"0":"-1",disabled:m.value==="year"},[d.value?f.value.length>3?f.value[0][1].year+" - "+f.value[3][1].year:"":c.value.displayTextOfYear])}function I(){return!d.value&&m.value!=="month"&&e.createVNode("button",{type:"button",class:N.value,onClick:F=>{h.value&&$(F)},tabindex:h.value?"0":"-1"},[c.value.displayTextOfMonth])}return e.createVNode("div",{class:y.value},[e.createVNode("div",{class:"f-datepicker-prev-btn"},[e.createVNode("button",{type:"button",class:v.value,onClick:D},[e.createVNode("i",{class:"f-icon f-icon-arrow-double-60-left"},null)]),b.value&&e.createVNode("button",{type:"button","aria-label":o.value,class:x.value,onClick:k},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-left"},null)])]),e.createVNode("div",{class:"f-datepicker-monthYearText"},[S.value==="yyyy-MM"?[B(),I()]:[I(),B()]]),e.createVNode("div",{class:"f-datepicker-next-btn"},[b.value&&e.createVNode("button",{type:"button","aria-label":a.value,class:C.value,onClick:T},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right"},null)]),e.createVNode("button",{type:"button",class:w.value,onClick:E},[e.createVNode("i",{class:"f-icon f-icon-arrow-double-60-right"},null)])])])}}}),Md={1:"一月",2:"二月",3:"三月",4:"四月",5:"五月",6:"六月",7:"七月",8:"八月",9:"九月",10:"十月",11:"十一月",12:"十二月"},Od=new Map([["appearance",ge]]);function Pd(t,n,o){return n}const Gv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/date-view.schema.json",title:"date-view",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for date picker",type:"string"},type:{description:"The type string of date picker",type:"string",default:"date-view"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},disable:{type:"string",default:!1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Uv={title:"date-view",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{visible:{description:"",title:"可见",type:"boolean"}}}}},_d={top:{type:Number,default:0},left:{type:Number,default:0},position:{type:String,default:"bottom"},enablePeriod:{type:Boolean,default:!1},dateFormat:{type:String,default:"yyyy-MM-dd"},valueFormat:{type:String,default:"yyyy-MM-dd"},dates:{type:Array,default:[]},daysInWeek:{type:Array,default:So},disableDates:{Type:Array,default:[]},disablePeriod:{Type:Array,default:[]},disableSince:{Type:Object,default:{year:0,month:0,day:0}},disableWeekdays:{Type:Array,default:[]},disableWeekends:{Type:Boolean,default:!1},disableUntil:{Type:Object,default:{year:0,month:0,day:0}},enableKeyboadNavigate:{type:Boolean,default:!0},enableMarkCurrent:{type:Boolean,default:!0},firstDayOfTheWeek:{type:String,default:"Sun."},highlightDates:{Type:Array,default:[]},highlightSaturday:{Type:Boolean,default:!1},highlightSunday:{Type:Boolean,default:!1},maxYear:{Type:Number,default:2500},minYear:{Type:Number,default:1},mode:{Type:String,default:"Embedded"},months:{type:Array,default:[[]]},nameOfMonths:{Type:Object,default:Md},secondaryDates:{type:Array,default:[]},secondaryMonths:{type:Array,default:[[]]},selectedDate:{type:Object,default:null},selectedMonth:{type:Object,default:null},selectedPeriod:{type:Object,default:null},selectedWeek:{type:Object,default:null},selectMode:{type:String,default:"day"},showWeekNumber:{type:Boolean,default:!1},weekTitle:{type:String,default:"Week"},years:{Type:Array,default:[[]]},value:{type:String,default:null}},Rd=me(_d,Gv,Od,Pd,Uv),Yv={months:{Type:Array,default:[[]]},enableMarkCurrent:{Type:Boolean,default:!1},enableKeyboadNavigate:{Type:Boolean,default:!0},enablePeriod:{Type:Boolean,default:!1},selected:{Type:Object,default:null},selectedPeriod:{Type:Object,default:null}},gr=e.defineComponent({name:"FDatePickerMonthView",props:Yv,emits:["click","keyDown","mouseEnter","mouseLeave"],setup(t,n){const o=e.ref(t.months),a=e.ref(t.enableMarkCurrent),r=e.ref(t.enableKeyboadNavigate),i=e.ref(t.enablePeriod),s=e.ref(t.selected),l=e.ref(t.selectedPeriod),{equal:p,inPeriod:c,isInitializedDate:f,equalOrEarlier:u}=Fn(),{getKeyCodeFromEvent:d}=pr();e.watch(()=>t.months,()=>{o.value=t.months}),e.watch(()=>t.selected,()=>{s.value=t.selected});function m(w,V){w.stopPropagation(),!V.disable&&n.emit("click",V)}function g(w,V){const N=d(w);N!==Nt.tab&&(w.preventDefault(),N===Nt.enter||N===Nt.space?m(w,V):r.value&&n.emit("keyDown",V))}function h(w){l.value&&f(l.value.from)&&!f(l.value.to)&&(o.value.forEach(V=>{V.forEach(N=>{N.range=!!l.value&&(u(l.value.from,N.date)&&u(N.date,w.date)||u(N.date,l.value.from)&&u(w.date,N.date))})}),n.emit("mouseEnter",w))}function y(){o.value.forEach(w=>{w.forEach(V=>{V.range=!1})}),n.emit("mouseLeave")}function v(w){return!!s.value&&p({year:s.value.year,month:s.value.month},{year:w.year,month:w.month})}function b(w){return!!l.value&&(p({year:l.value.from.month},w)||p({year:l.value.to.month},w))}function x(w){return c(w,l.value)}const C=w=>({"f-datepicker-month-cell":!0,"f-datepicker-current":w.isCurrent&&a.value,"f-datepicker-selected":!i.value&&v(w.date)||i.value&&b(w.date),"f-datepicker-disabled":w.disable,"f-datepicker-range":x(w.date)||w.range});return()=>e.createVNode("div",{class:"f-datepicker-table-wrapper"},[e.createVNode("table",{class:"f-datepicker-table"},[e.createVNode("tbody",null,[o.value&&o.value.map((w,V)=>e.createVNode("tr",null,[w.map((N,S)=>e.createVNode("td",{id:`m_${V}_${S}`,class:`m_${V}_${S}`,onClick:D=>m(D,N),onKeydown:D=>g(D,N),onMouseenter:()=>h(N),onMouseleave:()=>y(),tabindex:"0",style:"width: 33.3%"},[e.createVNode("div",{class:"f-datepicker-month"},[e.createVNode("span",{class:C(N)},[N.displayText])])]))]))])])])}}),Zv={years:{Type:Array,default:[[]]},enableKeyboadNavigate:{Type:Boolean,default:!0},enableMarkCurrent:{Type:Boolean,default:!0},enablePeriod:{Type:Boolean,default:!1},selected:{Type:Object,default:null},selectedPeriod:{Type:Object,default:null}},yr=e.defineComponent({name:"FDatePickerYearView",props:Zv,emits:["click","keyDown","mouseEnter","mouseLeave"],setup(t,n){const o=e.ref(t.years),a=e.ref(t.enableMarkCurrent),r=e.ref(t.enableKeyboadNavigate),i=e.ref(t.enablePeriod),s=e.ref(t.selected),l=e.ref(t.selectedPeriod),{equal:p,inPeriod:c,isInitializedDate:f,equalOrEarlier:u}=Fn(),{getKeyCodeFromEvent:d}=pr();e.watch(()=>t.years,()=>{o.value=t.years}),e.watch(()=>t.selected,()=>{s.value=t.selected});const m=(V,N)=>{const S=`y_${V}_${N}`,D={"f-datepicker-no-currmonth":V===0&&N===0||V===3&&N===2};return D[S]=!0,D};function g(V){return c(V,l.value)}function h(V){return!!s.value&&p({year:s.value.year},V)}function y(V){return!!l.value&&(p({year:l.value.from.year},V)||p({year:l.value.to.year},V))}const v=V=>({"f-datepicker-year-cell":!0,"f-datepicker-current":V.isCurrent&&a.value,"f-datepicker-selected":!l.value&&h(V.date)||i.value&&y(V.date),"f-datepicker-disabled":V.disable,"f-datepicker-range":g(V.date)||V.range});function b(V,N){V.stopPropagation(),!N.disable&&n.emit("click",N)}function x(V,N){const S=d(V);S!==Nt.tab&&(V.preventDefault(),S===Nt.enter||S===Nt.space?b(V,N):r.value&&n.emit("keyDown",N))}function C(V){l.value&&f(l.value.from)&&!f(l.value.to)&&(o.value.forEach(N=>{N.forEach(S=>{S.range=!!l.value&&(u(l.value.from,S.date)&&u(S.date,V.date)||u(S.date,l.value.from)&&u(V.date,S.date))})}),n.emit("mouseEnter",V))}function w(){o.value.forEach(V=>{V.forEach(N=>{N.range=!1})}),n.emit("mouseLeave")}return()=>e.createVNode("table",{class:"f-datepicker-table-wrapper"},[e.createVNode("tbody",{class:"f-datepicker-table"},[o.value&&o.value.map((V,N)=>e.createVNode("tr",null,[V.map((S,D)=>e.createVNode("td",{id:"y_{yi}_{i}",class:m(N,D),onClick:k=>b(k,S),onKeydown:k=>x(k,S),onMouseenter:()=>C(S),onMouseleave:()=>w(),tabindex:"0"},[e.createVNode("div",{class:"f-datepicker-year"},[e.createVNode("span",{class:v(S)},[S.year])])]))]))])])}});function br(){function t(r){return new Date(r.year||0,(r.month||1)-1,r.day,r.hour?r.hour:0,r.minute?r.minute:0,r.second?r.second:0,0).getDay()}function n(r){if(!r)return 1;if(!/^\d+$/.test(r.value))return-1;let i=Number(r.value);return(r.format.length===1&&r.value.length!==1&&i<10||r.format.length===1&&r.value.length!==2&&i>=10||r.format.length===2&&r.value.length>2)&&(i=-1),i}function o(r,i){if(r.value){for(let s=1;s<=12;s++)if(r.value.toLowerCase()===i[s].toLowerCase())return s}return-1}function a(r){const i=new Date(r.year||0,(r.month||1)-1,r.day,0,0,0,0);return i.setDate(i.getDate()+(i.getDay()===0?-3:4-i.getDay())),Math.round((i.getTime()-new Date(i.getFullYear(),0,4).getTime())/864e5/7)+1}return{getNumberByValue:n,getDayNumber:t,getMonthNumberByMonthName:o,getWeekNumber:a}}function Kv(t,n,o,a,r,i,s,l){const{getTimeInMilliseconds:p,getWeekdayIndex:c}=jt(),{isInitializedDate:f}=Fn(),{getDayNumber:u}=br();function d(m){if(m.year&&m.year<t&&m.month===12||m.year&&m.year>n&&m.month===1)return!0;const g=p(m);if(f(a)&&g+24*60*60*1e3-1<p(a)||f(o)&&g>p(o))return!0;if(s){const y=u(m);if(y===0||y===6)return!0}const h=u(m);return!!(l.length>0&&l.find(v=>c(v)===h)||r.length>0&&r.find(v=>(v.year===0||v.year===m.year)&&(v.month===0||v.month===m.month)&&v.day===m.day)||i.length>0&&i.find(v=>f(v.from)&&f(v.to)&&g>=p(v.from)&&g<=p(v.to)))}return{isDisabledDate:d}}function Qv(){const{getDayNumber:t}=br();function n(a,r,i){let s=[];s=r.reduce((p,c)=>{const f=c.dates.map(u=>({date:u,color:c.color}));return[...p,...f]},s);const l=s.find(p=>(p.date.year===0||p.date.year===a.year)&&(p.date.month===0||p.date.month===a.month)&&p.date.day===a.day);if(l)return{marked:!0,color:l.color};if(i&&i.marked){const p=t(a);if(p===0||p===6)return{marked:!0,color:i.color}}return{marked:!1,color:""}}function o(a,r,i,s){const l=t(a);return r&&l===0||i&&l===6?!0:!!s.find(c=>(c.year===0||c.year===a.year)&&(c.month===0||c.month===a.month)&&c.day===a.day)}return{isHighlightedDate:o,isMarkedDate:n}}function Ld(){const{getTimeInMilliseconds:t}=jt(),{isInitializedDate:n}=Fn();function o(r,i){return n(i)&&t(r)<=t(i)}function a(r,i){return n(i)&&t(r)>=t(i)}return{isMonthDisabledByDisableSince:a,isMonthDisabledByDisableUntil:o}}function vr(){const{getToday:t}=jt(),{isMonthDisabledByDisableSince:n,isMonthDisabledByDisableUntil:o}=Ld();function a(f){const u={displayTextOfMonth:"",month:0,year:0,displayTextOfYear:""};if(f){const d=f.match(/[^0-9]/),m=d&&d.length?d[0]:"",g=f.split(m);u.month=g[0].length===2?Number(g[0]):Number(g[1]),u.year=g[0].length===2?Number(g[1]):Number(g[0])}return u}function r(f,u){return new Date(u,f,0).getDate()}function i(f,u,d){return new Date(f,u-1,d,0,0,0,0)}function s(f,u){const d=i(u,f,1);return d.setMonth(d.getMonth()-1),r(d.getMonth()+1,d.getFullYear())}function l(f,u,d,m){const g=t(),h=[],{year:y}=u,v=3;for(let b=1;b<=12;b+=v){const x=[];for(let C=b;C<b+v;C++){const w=n({year:y,month:C,day:1},d)||o({year:y,month:C,day:r(C,y||0)},m);x.push({month:C,displayText:f[C],isCurrent:C===g.month&&y===g.year,disable:w,date:{year:y,month:C}})}h.push(x)}return h}function p(f,u){const d={year:f===12?u+1:u},m=f===12?1:f+1;return d.month=m,d}function c(f,u){const d={year:f===1?u-1:u},m=f===1?12:f-1;return d.month=m,d}return{daysInMonth:r,daysInPreMonth:s,generateMonths:l,parseDefaultMonth:a,getNextMonth:p,getPreviousMonth:c}}function Xv({isDisabledDate:t}){const{getToday:n}=jt(),{daysInMonth:o,daysInPreMonth:a,getNextMonth:r,getPreviousMonth:i}=vr(),{isHighlightedDate:s,isMarkedDate:l}=Qv(),{getWeekNumber:p}=br();function c(m){const g=So.indexOf(m);return g>0?7-g:0}function f(m,g,h){const y=new Date;y.setDate(1),y.setMonth(g-1),y.setFullYear(m);const v=y.getDay()+h;return v>=7?v-7:v}function u(m,g,h,y,v){return m===v.day&&g===v.month&&h===v.year&&y===yt.current}function d(m,g,h,y,v,b,x,C,w){const V=[],N=n(),S=f(g,m,c(h)),D=o(m,g),k=a(m,g);let A=1,$=yt.previous;for(let T=1;T<7;T++){const E=[];if(T===1){const I=k-S+1;for(let R=I;R<=k;R++){const O={year:m===1?g-1:g,month:m===1?12:m-1,day:R},W=u(R,m,g,$,N),M=t(O),_=l(O,y,v),H=s(O,C,x,b);E.push({date:O,tag:$,isCurrent:W,disable:M,marked:_,highlight:H})}$=yt.current;const F=7-E.length;for(let R=0;R<F;R++){const O={year:g,month:m,day:A},W=u(A,m,g,$,N),M=t(O),_=l(O,y,v),H=s(O,C,x,b);E.push({date:O,tag:$,isCurrent:W,disable:M,marked:_,highlight:H}),A++}}else for(let I=1;I<=7;I++){A>D&&(A=1,$=yt.next);const F={year:$===yt.next&&m===12?g+1:g,month:$===yt.current?m:$===yt.next&&m<12?m+1:1,day:A},R=u(A,m,g,$,N),O=t(F),W=l(F,y,v),M=s(F,C,x,b);E.push({date:F,tag:$,isCurrent:R,disable:O,marked:W,highlight:M}),A++}const B=w&&h==="Mon."?p(E[0].date):0;V.push({days:E,numberInTheYear:B,year:g})}return V}return{generateCalendar:d}}function Jv(){const{getToday:t}=jt(),{daysInMonth:n}=vr(),{isMonthDisabledByDisableSince:o,isMonthDisabledByDisableUntil:a}=Ld();function r(i,s,l,p,c,f){const u=[],d=i-i%10,{year:m,month:g}=s,h=t(),y=3,v=d+10;for(let b=d-1;b<v;b+=y){const x=[];for(let C=b;C<b+y;C++){const w=o({year:C,month:g,day:1},c)||a({year:C,month:g,day:n(g||0,C)},f),V=C<l||C>p;x.push({year:C,isCurrent:C===h.year,selected:C===m,disable:w||V,date:{year:C}})}u.push(x)}return u}return{generateYears:r}}const In=e.defineComponent({name:"FDateView",props:_d,emits:["datePicked"],setup(t,n){const o=e.ref(t.mode),a=e.ref(t.top),r=e.ref(t.left),i=e.ref(t.position),s=e.ref(t.enablePeriod),l=e.ref(t.selectMode),p=e.ref(t.dateFormat),c=e.ref(t.nameOfMonths),f=e.ref(t.valueFormat),u=e.ref([]),d=e.ref(!1),m=e.ref(""),g=e.ref(!1),h=e.ref(""),y=e.ref(),v=e.ref(!1),b=e.ref(!1),x=e.ref(!1),C=e.ref(!1),w=e.ref(!1),V=e.ref(!1),N=e.ref(!1),S=e.ref(!1),D=e.ref(t.secondaryDates),k=e.ref(t.daysInWeek),A=e.ref(t.enableKeyboadNavigate),$=e.ref(t.enableMarkCurrent),T=e.ref(t.firstDayOfTheWeek),E=e.ref(t.showWeekNumber),B=e.ref(t.selectedDate),I=e.ref(t.value),F=e.ref(t.selectedWeek),R=e.ref(t.selectedPeriod),O=e.ref(t.weekTitle),W=e.ref(t.secondaryMonths),M=e.ref(t.selectedMonth),_=e.ref(t.minYear),H=e.ref(t.maxYear),L=e.ref(t.disableSince),G=e.ref(t.disableUntil),Y=e.ref(t.disableDates),z=e.ref(t.disablePeriod),q=e.ref(t.disableWeekdays),j=e.ref(t.disableWeekends),Z=Kv(_.value,H.value,L.value,G.value,Y.value,z.value,j.value,q.value),{generateCalendar:U}=Xv(Z),{getToday:X,getDateObject:ie}=jt(),{generateMonths:de,getNextMonth:ne,getPreviousMonth:oe}=vr(),{generateYears:ee}=Jv(),K=X(),se=e.computed(()=>I.value?ie(I.value,f.value):K);B.value=se.value;const ue=e.ref({year:se.value.year||1,month:se.value.month||1,displayTextOfMonth:c.value[se.value.month||"1"],displayTextOfYear:`${se.value.year}`}),Te=K.month===12?(K.year||1)+1:K.year,ke=(K.month||1)<12?(K.month||1)+1:1,_e=e.ref({year:Te,month:ke,displayTextOfMonth:c.value[K.month||"1"],displayTextOfYear:`${Te}`}),te=e.computed(()=>U(ue.value.month,ue.value.year,T.value,[],{marked:!0,color:""},t.highlightDates,t.highlightSaturday,t.highlightSunday,E.value)),ce=e.computed(()=>de(c.value,{year:ue.value.year,month:ue.value.month},L.value,G.value)),pe=e.computed(()=>ee(ue.value.year,{year:ue.value.year,month:ue.value.month},_.value,H.value,L.value,G.value)),we=e.computed(()=>{const De={"f-datepicker-container":!0},et=`container-position-${i.value}`;return De[et]=!0,De});function He(){return s.value?"":"287px"}const le=e.computed(()=>({top:`${a.value}px`,left:`${r.value}px`,width:He(),position:o.value==="Embedded"?"relative":"absolute","z-index":o.value==="Embedded"?0:9999}));function he(De){}function Ne(De){De.stopPropagation()}function Fe(De,et){const $e=ue.value.year-(g.value?10:1),tn={year:$e,month:ue.value.month,displayTextOfMonth:c.value[ue.value.month||"1"],displayTextOfYear:`${$e}`};ue.value=tn}function Ue(De,et){const $e=oe(ue.value.month,ue.value.year),tn={year:$e.year||1,month:$e.month||1,displayTextOfMonth:c.value[$e.month||"1"],displayTextOfYear:`${$e.year}`};ue.value=tn}function Ye(De,et){const $e=ne(ue.value.month,ue.value.year),tn={year:$e.year||1,month:$e.month||1,displayTextOfMonth:c.value[$e.month||"1"],displayTextOfYear:`${$e.year}`};ue.value=tn}function We(De,et){let $e=ue.value.year+1;g.value&&($e=pe.value[3][0].year+2);const tn={year:$e,month:ue.value.month,displayTextOfMonth:c.value[ue.value.month||"1"],displayTextOfYear:`${$e}`};ue.value=tn}function be(De){d.value=!d.value,g.value=!1}function ze(De){d.value=!1,g.value=!g.value}const it=e.computed(()=>({"active-month":ue.value,"date-format":p.value,"disable-pre-page":v.value,"disable-pre-record":b.value,"disable-next-record":x.value,"disable-next-page":C.value,years:pe.value,"selecting-month":d.value,"selecting-year":g.value,"select-mode":l.value})),bt=e.computed(()=>({"active-month":_e.value,"date-format":p.value,"disable-pre-page":w.value,"disable-pre-record":V.value,"disable-next-record":N.value,"disable-next-page":S.value,years:u.value,"selecting-month":m.value,"selecting-year":h.value,"select-mode":l.value}));function pt(De,et){return e.createVNode(hr,e.mergeProps(et,{onPrePage:$e=>Fe(),onPreRecord:$e=>Ue(),onNextRecord:$e=>Ye(),onNextPage:$e=>We(),onClickMonth:$e=>be(),onClickYear:$e=>ze()}),null)}const mt=e.computed(()=>!d.value&&!g.value&&!y.value||s.value&&l.value!=="week"&&!m.value&&!h.value&&!y.value),Dt=e.computed(()=>d.value&&!g.value),xt=e.computed(()=>g.value&&!d.value),je=e.computed(()=>({dates:te.value,daysInWeek:k.value,enableKeyboadNavigate:A.value,enableMarkCurrent:$.value,enablePeriod:s.value,firstDayOfTheWeek:T.value,selected:B.value,selectedPeriod:R.value,selectedWeek:F.value,selectMode:l.value,showWeekNumber:E.value,weekTitle:O.value})),kt=e.computed(()=>({dates:D,daysInWeek:k.value,enableKeyboadNavigate:A.value,enableMarkCurrent:$.value,enablePeriod:s.value,firstDayOfTheWeek:T.value,selected:B.value,selectedPeriod:R.value,selectMode:l.value,showWeekNumber:E.value,weekTitle:O.value}));function Et(De,et){B.value=De,n.emit("datePicked",De)}function Ge(De){}function re(De){}function fe(De,et){}function Ce(De,et){}function Re(De,et){return mt.value&&e.createVNode(mr,e.mergeProps(et,{onClick:$e=>Et($e),onClickWeek:$e=>void 0,onKeyDown:$e=>void 0,onMouseEnter:$e=>void 0,onMouseLeave:$e=>void 0}),null)}const Oe=e.computed(()=>({months:ce.value,enableMarkCurrent:$.value,enableKeyboadNavigate:A.value,enablePeriod:s.value,selected:M.value,selectedPeriod:R.value})),st=e.computed(()=>({months:W.value,enableMarkCurrent:$.value,enableKeyboadNavigate:A.value,enablePeriod:s.value,selected:M.value,selectedPeriod:R.value}));function Ct(De,et){d.value=!1,g.value=!1,M.value=De,ue.value={month:De.month||1,displayTextOfMonth:c.value[ue.value.month||"1"],year:ue.value.year||1,displayTextOfYear:`${ue.value.displayTextOfYear}`}}function ht(De){}function Cn(De,et){}function Mm(De,et){}function ta(De,et){return e.createVNode(gr,e.mergeProps(et,{onClick:$e=>Ct($e),onKeyDownMonthView:$e=>void 0,onMouseEnterMonthView:$e=>void 0,onMouseLeaveMonthView:$e=>void 0}),null)}const Ks=e.computed(()=>({years:pe.value,enableKeyboadNavigate:A.value,enableMarkCurrent:$.value,enablePeriod:s.value,selected:B.value,selectedPeriod:R.value})),VD=e.computed(()=>({years:u.value,enableKeyboadNavigate:A.value,enableMarkCurrent:$.value,enablePeriod:s.value,selected:B.value,selectedPeriod:R.value}));function ND(De,et){d.value=!0,g.value=!1,ue.value={month:ue.value.month,displayTextOfMonth:ue.value.displayTextOfMonth,year:De.year||1,displayTextOfYear:`${De.year}`}}function F6(De){}function I6(De,et){}function M6(De,et){}function SD(De){ue.value={year:K.year||1,month:K.month||1,displayTextOfMonth:c.value[K.month||"1"],displayTextOfYear:`${K.year}`},B.value=K}function TD(De){ue.value={year:K.year||1,month:K.month||1,displayTextOfMonth:c.value[K.month||"1"],displayTextOfYear:`${K.year}`},B.value=K,M.value={year:K.year,month:K.month}}function DD(De){ue.value={year:K.year||1,month:K.month||1,displayTextOfMonth:c.value[K.month||"1"],displayTextOfYear:`${K.year}`},B.value=K}const kD=e.computed(()=>s.value&&l.value!=="week");function Om(De,et){return e.createVNode(yr,e.mergeProps(et,{onClick:$e=>ND($e),onKeyDownYearView:$e=>void 0,onClickPreRecord:$e=>Ue(),onClickNextRecord:$e=>Ye(),onMouseEnterYearView:$e=>void 0,onMouseLeaveYearView:$e=>void 0}),null)}return()=>e.createVNode("div",{class:we.value,style:le.value,tabindex:"0",onKeyup:De=>void 0,onClick:De=>Ne(De)},[e.createVNode("div",{class:"f-datepicker-content"},[pt(!1,it.value),Re(!1,je.value),d.value&&ta(!1,Oe.value),g.value&&Om(!1,Ks.value),e.createVNode("div",{class:"f-datepicker-footer"},[e.createVNode("div",{class:"f-datepicker-redirect"},[mt.value&&e.createVNode("button",{class:"btn btn-link",onClick:SD},[e.createTextVNode("今天")]),Dt.value&&e.createVNode("button",{class:"btn btn-link",onClick:TD},[e.createTextVNode("本月")]),xt.value&&e.createVNode("button",{class:"btn btn-link",onClick:DD},[e.createTextVNode("今年")])])])]),kD.value&&e.createVNode("div",{class:"f-datepicker-content"},[pt(!0,bt.value),Re(!0,kt.value),m.value&&ta(!0,st.value),h.value&&Om(!0,VD.value)])])}}),ex={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/date-picker.schema.json",title:"date-picker",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for date picker",type:"string"},type:{description:"The type string of date picker",type:"string",default:"date-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},tx={title:"date-picker",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},To={disableDates:{Type:Array,default:[]},disablePeriod:{Type:Array,default:[]},disableSince:{Type:Object,default:{year:0,month:0,day:0}},disableWeekdays:{Type:Array,default:[]},disableWeekends:{Type:Boolean,default:!1},disableUntil:{Type:Object,default:{year:0,month:0,day:0}},displayTime:{Type:Boolean,default:!1},highlightDates:{Type:Array,default:[]},highlightSaturday:{Type:Boolean,default:!1},highlightSunday:{Type:Boolean,default:!1},maxYear:{Type:Number,default:2500},minYear:{Type:Number,default:1},modelValue:{type:String,default:""},nameOfMonths:{Type:Object,default:Md},selectMode:{Type:String,default:"day"},valueFormat:{Type:String,default:"yyyy-MM-dd"},displayFormat:{Type:String,default:"yyyy-MM-dd"},enablePeriod:{type:Boolean,default:!1},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1}},Hd=me(To,ex,Od,Pd,tx),xr=e.defineComponent({name:"FDatePicker",props:To,emits:["update:modelValue","datePicked"],setup(t,n){const o='<span class="f-icon f-icon-date"></span>',a=e.ref(t.modelValue),r=e.ref(null),i=e.ref(t.maxYear),s=e.ref(t.minYear),l=e.ref(t.enablePeriod),p=e.ref(a.value),c=e.ref(t.highlightSaturday),f=e.ref(t.highlightSunday),u=e.ref(t.nameOfMonths),d=e.ref(t.highlightDates),m=e.ref(t.showWeekNumber),g=e.ref(t.selectMode),h=e.ref(t.displayTime),y=e.ref(t.disableWeekends),v=e.ref(t.disableWeekdays);e.ref([t.disableSince]);const b=e.ref([t.disableUntil]),{formatTo:x}=_a();function C(){}const w=e.computed(()=>x(p.value,t.displayFormat));function V(k,A=!0){const $=x(k,t.valueFormat);a.value=$,p.value=$,A&&n.emit("update:modelValue",$)}function N(){document.body.click()}function S(k){const A=`${k.year}-${k.month}-${k.day}`;V(A),n.emit("datePicked",p.value),N()}function D(){V(""),n.emit("datePicked",p.value)}return e.watch(()=>t.modelValue,(k,A)=>{k!==A&&V(k)}),e.onMounted(()=>{a.value&&V(a.value)}),()=>e.createVNode(dt,{ref:r,modelValue:w.value,buttonContent:o,enableClear:!0,onClear:D,onClickButton:C,focusOnCreated:t.focusOnCreated,selectOnCreated:t.selectOnCreated},{default:()=>[e.createVNode(In,{mode:"Popup",value:p.value,valueFormat:t.valueFormat,minYear:s.value,maxYear:i.value,enablePeriod:l.value,highlightSunday:f.value,highlightSaturday:c.value,nameOfMonths:u.value,highlightDates:d.value,showWeekNumber:m.value,selectMode:g.value,displayTime:h.value,disableWeekends:y.value,disableWeekdays:v.value,disableUntil:b.value,onDatePicked:k=>S(k)},null)]})}}),nx=e.defineComponent({name:"FDatePickerDesign",props:To,emits:["update:modelValue","datePicked"],setup(t,n){const o='<span class="f-icon f-icon-date"></span>',a=e.ref(t.modelValue),r=e.ref(),i=e.inject("design-item-context"),s=ye(r,i);return e.onMounted(()=>{r.value.componentInstance=s}),n.expose(s.value),()=>e.createVNode(dt,{ref:r,modelValue:a.value,"onUpdate:modelValue":l=>a.value=l,buttonContent:o,enableClear:!0},null)}}),ox=e.defineComponent({name:"FDateViewDesign",props:To,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(In,{ref:o},null)}}),jd={install(t){t.component(mr.name,mr).component(hr.name,hr).component(In.name,In).component(gr.name,gr).component(yr.name,yr).component(xr.name,xr)},register(t,n,o){t["date-picker"]=xr,t["date-view"]=In,n["date-picker"]=Hd,n["date-view"]=Rd},registerDesigner(t,n,o){t["date-picker"]=nx,t["date-view"]=ox,n["date-picker"]=Hd,n["date-view"]=Rd}};function ax(t,n,o){return!n||!n.length?{columns:[]}:(n.forEach(a=>{a.title=a.caption?a.caption:a.title,a.field=a.binding?a.binding.path:a.field}),{columns:n})}const rx=new Map([["appearance",ge],["column","columnOption"],["fields",ax]]);function ix(t,n,o){var u;const a=o.parentComponentInstance,r=a.schema.type,i=String(((u=a.schema.appearance)==null?void 0:u.class)||"").split(" "),s=r==="section"||r==="tab-page",l=i.includes("f-page-content-nav"),p=i.includes("f-page-main"),c=t.getSchemaByType("component");c.id=`${n.id}-component`,c.componentType="data-grid";let f="";return f+=s?"f-struct-data-grid-in-card f-struct-is-subgrid":"",f+=l?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",f+=p?"f-struct-data-grid f-struct-wrapper":"",c.appearance={class:f},c.contents=[n],c}function sx(t,n,o){const a=o.parentComponentInstance,r=String(a.schema.appearance.class||"").split(" "),i=r.includes("f-page-content-nav"),s=r.includes("f-page-main"),l=t.getSchemaByType("section");l.id=`${n.id}-section`;let p="";return p+=i?"f-section-in-nav ":"",p+=s?"f-section-in-managelist ":"",p+="f-section-grid",l.appearance={class:p},l.contents=[n],l}function lx(t,n,o){const a=t.getSchemaByType("content-container");return a.id=`${n.id}-layout`,a.appearance={class:"f-grid-is-sub f-utils-flex-column"},a.contents=[n],a}function cx(t,n,o){const r=o.parentComponentInstance.schema.type,i=r==="section"||r==="tab-page";n.appearance={class:"f-component-grid"};const l=(i?lx:sx)(t,n,o);return ix(t,l,o)}const dx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/data-grid.schema.json",title:"data-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"data-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disable:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}}},required:["id","type"]},ux={title:"data-grid",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Cr={columns:{type:Array,default:[]},columnOption:{type:Object},data:{type:Array,default:[]},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},filter:{type:Object},fit:{type:Boolean,default:!1},focusOnEditingCell:{type:Boolean,default:!0},selectOnEditingCell:{type:Boolean,default:!1},group:{type:Object},header:{type:Object},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},mergeCell:{type:Boolean,default:!1},pagination:{type:Object,default:{enable:!1,size:20}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showScrollBar:{type:String,default:"auto"},showSetting:{type:Boolean,default:!1},showStripe:{type:Boolean,default:!0},sort:{type:Object},summary:{type:Object,default:{enable:!0,groupFields:["numericField1","numericField2"]}},virtualized:{type:Boolean,default:!1},width:{type:Number,default:-1},newDataItem:{type:Function,default:()=>{}},enableCommands:{type:Boolean,default:!1},commandOption:{type:Object,default:{enable:!1,commands:[]}},appendOnEnterAtLastCell:{type:Boolean,default:!1}},Wd=me(Cr,dx,rx,cx,ux);function qd(t,n,o,a,r,i,s,l,p,c,f,u,d,m){const{calculateCellPositionInRow:g,cellKey:h,cellPosition:y,rowKey:v,rowPosition:b,rowSpanCellPosition:x,groupCellPosition:C,summaryCellPosition:w}=i,{collpaseGroupIconClass:V}=p,{gridRowClass:N,onClickRow:S,onMouseoverRow:D,onMouseoutRow:k}=f,{onClickCell:A}=l,{toggleGroupRow:$}=u,{columnContext:T,hasLeftFixedColumn:E,hasRightFixedColumn:B}=s,{navigateOnKeyUp:I}=c,{gridDataStyle:F,gridMergedDataStyle:R,leftFixedGridDataStyle:O,leftFixedGridMergedDataStyle:W,rightFixedGridDataStyle:M,rightFixedGridMergedDataStyle:_}=d;function H(oe,ee){ee.collapse=!ee.collapse,m.value=$(ee.collapse?"collapse":"expand",ee,m.value)}function L(oe,ee){const K=[];if(oe.groupField&&ee[oe.groupField]){for(let ue=0;ue<=oe.layer;ue++)K.push(e.createVNode("div",{class:"fv-grid-group-row-icon",onClick:Te=>H(Te,oe)},[e.createVNode("span",{class:V(oe)},null)]));const se=oe.data[oe.groupField];K.push(e.createVNode("div",{ref:se.setRef,key:h(oe,oe.layer+1),class:"fv-grid-cell",style:C(se,ee,oe.layer)},[se.data])),Object.values(oe.data).filter(ue=>ue.field!==oe.groupField&&ue.colSpan!==0).forEach(ue=>{K.push(e.createVNode("div",{ref:ue.setRef,key:h(oe,ue.index),class:"fv-grid-cell",style:y(ue,ee)},[ue.data]))})}return K}function G(oe,ee){return oe.layer>-1&&e.createVNode("div",{ref:oe.setRef,key:v(oe),class:N(oe),style:b(oe),onClick:K=>S(K,oe),onMouseover:K=>D(K,oe)},[L(oe,ee)])}function Y(oe,ee){const K=[];if(oe.groupField&&ee[oe.groupField]){const se=oe.data[oe.groupField];K.push(e.createVNode("div",{ref:se.setRef,key:h(oe,oe.layer+1),class:"fv-grid-cell",style:w(se,ee,oe.layer)},[se.data]))}return K}function z(oe,ee){return oe.layer>-1&&e.createVNode("div",{ref:oe.setRef,key:v(oe),class:N(oe),style:b(oe),onClick:K=>S(K,oe),onMouseover:K=>D(K,oe)},[Y(oe,ee)])}function q(oe,ee){return e.createVNode("div",{ref:oe.setRef,key:v(oe),class:N(oe),style:b(oe),onClick:K=>S(K,oe),onMouseover:K=>D(K,oe),onMouseout:K=>k(K,oe)},[Object.values(oe.data).filter(K=>ee[K.field]&&K.rowSpan===1).map(K=>e.createVNode("div",{ref:K.setRef,key:h(oe,K.index),class:"fv-grid-cell",style:y(K,ee),onClick:se=>A(se,K),onKeyup:se=>I(se,K)},[K.mode===ct.editing?K.getEditor(K):K.formatter?K.formatter(K,oe):K.data!=null?K.data.toString():K.data]))])}const j=[q,G,z];function Z(oe,ee){const K=g(oe);return m.value.map(se=>j[se.type](se,K))}function U(oe){const ee=g(oe);return m.value.map(K=>Object.values(K.data).filter(se=>ee[se.field]&&se.rowSpan>1).map(se=>e.createVNode("div",{key:h(K,se.index),class:"fv-grid-cell fv-grid-merged-cell",style:x(K,se,ee)},[se.data])))}function X(){return e.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:O.value},[Z(T.value.leftColumns.filter(oe=>oe.visible))]),e.createVNode("div",{class:"fv-grid-merge-date",style:W.value},[U(T.value.leftColumns.filter(oe=>oe.visible))])])}function ie(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:F.value},[Z(T.value.primaryColumns.filter(oe=>oe.visible))]),e.createVNode("div",{class:"fv-grid-merge-date",style:R.value},[U(T.value.primaryColumns.filter(oe=>oe.visible))])])}function de(){return e.createVNode("div",{ref:r,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:M.value},[Z(T.value.rightColumns.filter(oe=>oe.visible))]),e.createVNode("div",{class:"fv-grid-merge-date",style:_.value},[U(T.value.rightColumns.filter(oe=>oe.visible))])])}function ne(){const oe=[];return E.value&&oe.push(X()),oe.push(ie()),B.value&&oe.push(de()),oe}return{renderDataArea:ne}}const Mn=e.defineComponent({name:"FDataGrid",props:Cr,emits:["ClickRow","DoubleClickRow","selectionChange","enterUpInLastCell","pageIndexChanged","pageSizeChanged"],setup(t,n){var xt;const o=e.ref(t.columns),a=20,r=Xt(t),i=0,s=e.ref(),l=e.ref(),p=e.ref(),c=e.ref(),f=e.ref(),u=e.ref(t.showStripe),d=e.ref([]),m=e.ref(!1),g=e.ref(((xt=t.rowOption)==null?void 0:xt.wrapContent)||!1),h=vn(t,r),y=Xo(),v=Ut(t),b=Gt(t,new Map,v,r),x=Jt(t,b,r,d,n),C=e.computed(()=>t.disable),w=e.computed(()=>b.totalItems.value<a?b.totalItems.value:a),{containerStyleObject:V}=qn(t),N=Is(t),{applyCommands:S}=N;S(o);const D=zn(t),k=Ls(),{applyColumnSorter:A,columnContext:$,updateColumnRenderContext:T}=D;A(b,k);const E=Ps(t,$),B=Qt(t,r),I=Pt(),F=Zt(t,B,I),R=Kt(t,B,v,r,I,F),O=Jo(t,r,F,R),W=ea(t,r,F,R),M=Yt(t,o,b,w,i,R,O,W),{getVisualData:_}=M,H=bn(t,$),L=Rs(t,x),{sidebarWidth:G}=L;d.value=_(0,w.value+i-1);const Y=Gn(t,b,d,$,M,w,i,G),{onWheel:z,dataGridWidth:q,viewPortHeight:j,viewPortWidth:Z,resetScroll:U}=Y,X=Os(t,$,l,Z,E),{calculateColumnsSize:ie}=X,de=_s(),ne=Fs(l,f,b,de,Y),oe=Un(t,n,x,r),ee=Ms(t,n,D,b,E,h,Y),K=e.computed(()=>({"fv-grid":!0,"fv-datagrid-strip":u.value})),se=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":m.value,"fv-grid-wrap-content":g.value})),{renderGridHeader:ue,renderGridColumnResizeOverlay:Te}=ks(t,l,c,f,D,b,ee,ne,y,de,X,E,x,L,k,Y,Z,d),{renderDataGridPagination:ke}=ym(t,n,b,Y),{renderDataGridSidebar:_e}=Es(t,oe,x,L,Y),{renderDisableMask:te}=As(),{renderDataGridSummery:ce}=bm(t,b,D),{renderHorizontalScrollbar:pe}=$s(t,l,Y),{renderVerticalScrollbar:we}=Bs(t,l,Y),{renderFilterPanel:He}=mm(t,D,b,y,Y),{renderGroupPanel:le}=hm(t,b,ee,h,Y);function he(){var je,kt;j.value=((je=p.value)==null?void 0:je.clientHeight)||0,q.value=((kt=l.value)==null?void 0:kt.clientWidth)||0,ie()}e.onMounted(()=>{l.value&&(Zn.useResizeObserver(l.value,he),ie(),e.nextTick(()=>{l.value&&(q.value=l.value.clientWidth),p.value&&(Z.value=p.value.clientWidth,j.value=p.value.clientHeight)}))}),e.onUnmounted(()=>{}),e.watch(Z,()=>{l.value&&ie()});function Ne(){b.insertNewDataItem(),U()}function Fe(){b.insertNewDataItem(d.value.length),U()}function Ue(je){B.onEditingRow(je)}function Ye(je){b.removeDataItem(je),U()}function We(je){b.removeDataItemById(je),U()}function be(je){B.acceptEditingRow(je)}function ze(je){B.cancelEditingRow(je)}function it(je){je&&(o.value=je,S(o),T(o.value),A(b,k),ie())}function bt(je){je&&(b.load(je),d.value=_(0,w.value+i-1))}const pt={addNewDataItem:Ne,addNewDataItemAtLast:Fe,removeDataItem:Ye,removeDataItemById:We,editDataItem:Ue,acceptDataItem:be,cancelDataItem:ze,updateColumns:it,updateDataSource:bt};n.expose(pt);const mt=vm(t,n,pt,D,B,d),{renderDataArea:Dt}=qd(t,n,p,c,f,H,D,B,h,mt,oe,M,Y,d);return()=>e.createVNode("div",{ref:s,class:K.value,style:V.value,onWheel:z},[He(),le(),ue(),e.createVNode("div",{ref:l,class:se.value,onMouseover:()=>{m.value=!0},onMouseleave:()=>{m.value=!1}},[_e(d),Dt(),pe(),we()]),ce(),ke(),Te(),C.value&&te()])}});function fx(t){t.schema;const n=e.ref(!0),o=e.ref(!0);function a(c){return c&&c.sourceType==="control"?c.controlCategory==="input":!1}function r(){return!1}function i(){return!1}function s(){return!0}function l(c){}function p(){}return{canAccepts:a,checkCanDeleteComponent:r,checkCanMoveComponent:i,hideNestedPaddingInDesginerView:s,onAcceptMovedChildElement:l,resolveComponentContext:p,triggerBelongedComponentToMoveWhenMoved:n,triggerBelongedComponentToDeleteWhenDeleted:o}}const wr=e.defineComponent({name:"FDataGridDesign",props:Cr,emits:["ClickRow","DoubleClickRow","selectionChange","enterUpInLastCell","pageIndexChanged","pageSizeChanged"],setup(t,n){var Et;const o=e.ref(),a=e.inject("design-item-context"),r=fx(a),i=ye(o,a,r);i.value.styles="display:flex;flex:1;",e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const s=e.ref(t.columns),l=20,p=Xt(t),c=0,f=e.ref(),u=e.ref(),d=e.ref(),m=e.ref(),g=e.ref(t.showStripe),h=e.ref([]),y=e.ref(!1),v=e.ref(((Et=t.rowOption)==null?void 0:Et.wrapContent)||!1),b=vn(t,p),x=Xo(),C=Ut(t),w=Gt(t,new Map,C,p),V=Jt(t,w,p,h,n),N=e.computed(()=>t.disable),S=e.computed(()=>w.totalItems.value<l?w.totalItems.value:l),{containerStyleObject:D}=qn(t),k=Is(t),{applyCommands:A}=k;A(s);const $=zn(t),T=Ls(),{applyColumnSorter:E,columnContext:B,updateColumnRenderContext:I}=$;E(w,T);const F=Ps(t,B),R=Qt(t,p),O=Pt(),W=Zt(t,R,O),M=Kt(t,R,C,p,O,W),_=Jo(t,p,W,M),H=ea(t,p,W,M),L=Yt(t,s,w,S,c,M,_,H),{getVisualData:G}=L,Y=bn(t,B),z=Rs(t,V),{sidebarWidth:q}=z;h.value=G(0,S.value+c-1);const j=Gn(t,w,h,B,L,S,c,q),{onWheel:Z,dataGridWidth:U,viewPortHeight:X,viewPortWidth:ie,resetScroll:de}=j,ne=Os(t,B,f,ie,F),{calculateColumnsSize:oe}=ne,ee=_s(),K=Fs(f,m,w,ee,j),se=Un(t,n,V,p),ue=Ms(t,n,$,w,F,b,j),Te=e.computed(()=>({"fv-grid":!0,"fv-datagrid-strip":g.value})),ke=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":y.value,"fv-grid-wrap-content":v.value})),{renderGridHeader:_e,renderGridColumnResizeOverlay:te}=ks(t,f,d,m,$,w,ue,K,x,ee,ne,F,V,z,T,j,ie,h),{renderDataGridPagination:ce}=ym(t,n,w,j),{renderDataGridSidebar:pe}=Es(t,se,V,z,j),{renderDisableMask:we}=As(),{renderDataGridSummery:He}=bm(t,w,$),{renderHorizontalScrollbar:le}=$s(t,f,j),{renderVerticalScrollbar:he}=Bs(t,f,j),{renderFilterPanel:Ne}=mm(t,$,w,x,j),{renderGroupPanel:Fe}=hm(t,w,ue,b,j);function Ue(){var Ge,re;X.value=((Ge=u.value)==null?void 0:Ge.clientHeight)||0,U.value=((re=f.value)==null?void 0:re.clientWidth)||0,oe()}e.onMounted(()=>{f.value&&(Zn.useResizeObserver(f.value,Ue),oe(),e.nextTick(()=>{f.value&&(U.value=f.value.clientWidth),u.value&&(ie.value=u.value.clientWidth,X.value=u.value.clientHeight)}))}),e.onUnmounted(()=>{}),e.watch(ie,()=>{f.value&&oe()});function Ye(){w.insertNewDataItem(),de()}function We(){w.insertNewDataItem(h.value.length),de()}function be(Ge){R.onEditingRow(Ge)}function ze(Ge){w.removeDataItem(Ge),de()}function it(Ge){w.removeDataItemById(Ge),de()}function bt(Ge){R.acceptEditingRow(Ge)}function pt(Ge){R.cancelEditingRow(Ge)}function mt(Ge){Ge&&(s.value=Ge,A(s),I(s.value),E(w,T),oe())}function Dt(Ge){Ge&&(w.load(Ge),h.value=G(0,S.value+c-1))}const je=vm(t,n,{addNewDataItem:Ye,addNewDataItemAtLast:We,removeDataItem:ze,removeDataItemById:it,editDataItem:be,acceptDataItem:bt,cancelDataItem:pt,updateColumns:mt,updateDataSource:Dt},$,R,h),{renderDataArea:kt}=qd(t,n,u,d,m,Y,$,R,b,je,se,L,j,h);return()=>e.createVNode("div",{ref:o,class:Te.value,style:D.value,onWheel:Z},[Ne(),Fe(),_e(),e.createVNode("div",{ref:f,class:ke.value,onMouseover:()=>{y.value=!0},onMouseleave:()=>{y.value=!1}},[pe(h),kt(),le(),he()]),He(),ce(),te(),N.value&&we()])}}),zd={install(t){t.component(Mn.name,Mn),t.component(wr.name,wr)},register(t,n,o){t["data-grid"]=Mn,n["data-grid"]=Wd},registerDesigner(t,n,o){t["data-grid"]=wr,n["data-grid"]=Wd}};function px(t,n,o){return n}const mx=new Map([["appearance",ge]]),hx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dropdown.schema.json",title:"dropdown",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for dropdown",type:"string"},type:{description:"The type string of dropdown",type:"string",default:"dropdown"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},gx={title:"dropdown",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},Vr={show:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},title:{type:String,default:"下拉示例"},size:{type:String,default:""},type:{type:String,default:"primary"},iconClass:{type:String,default:""},active:{type:Boolean,default:!1},splitButton:{type:Boolean,default:!1},position:{type:String,default:"bottom"},model:{type:Array,default:[{label:"项目一",value:"XM1"},{label:"项目二",value:"XM2"},{label:"项目三",value:"XM3"}]},onSelect:{type:Function,default:()=>{}}},Gd=me(Vr,hx,mx,px,gx);function Ud(t,n){let o;const a=e.ref(t.show),r=e.ref(),i=e.ref(),s=e.ref(),l=10;e.onMounted(()=>{o=i.value});const p=(v=1)=>{const b=["body>.f-datagrid-settings-simple-host","body>div","body>farris-dialog>.farris-modal.show","body>.farris-modal.show","body>farris-filter-panel>.f-filter-panel-wrapper","body .f-sidebar-show>.f-sidebar-main","body>.popover.show","body>filter-row-panel>.f-datagrid-filter-panel","body>.f-section-maximize"],x=Array.from(document.body.querySelectorAll(b.join(","))).filter(w=>w).map(w=>{const{display:V,zIndex:N}=window.getComputedStyle(w);return V==="none"?0:parseInt(N,10)}).filter(w=>w);let C=Math.max(...x);return C<1040&&(C=1040),C+v},c=(v,b)=>{const{height:x,left:C,top:w,width:V}=v.getBoundingClientRect(),{width:N,height:S,top:D}=b.getBoundingClientRect();if(v.className.indexOf("dropdown-submenu")>-1||v.closest(".dropdown-submenu")||v.classList.contains("dropright")){const A=window.innerWidth-C-v.offsetWidth,$=window.innerHeight-w,{position:T}=getComputedStyle(b);if(T==="fixed"){let E=C+v.offsetWidth;b.offsetWidth>A&&C>A&&(E=C-N),b.style.left=E+"px",b.style.right="auto",window.innerHeight-2*l<b.offsetHeight?(b.style.top=l+"px",b.style.bottom=l+"px",b.style.maxHeight=window.innerHeight-2*l+"px",b.style.overflowY="auto",b.className+=" dropdown-menu-maxheight"):$<b.offsetHeight?(b.style.top="auto",b.style.bottom=l+"px"):(b.style.top=w+"px",b.style.bottom="auto")}else{if(b.offsetWidth>A){const E=-N;b.style.left=E+"px"}window.innerHeight-2*l<b.offsetHeight?(b.style.top=-1*(w-l)+"px",b.style.bottom="auto",b.style.maxHeight=window.innerHeight-2*l+"px",b.style.overflowY="auto",b.className+=" dropdown-menu-maxheight"):$<b.offsetHeight&&(b.style.top=$-b.offsetHeight-l+"px",b.style.bottom="auto")}}else{const{marginTop:A,marginBottom:$}=getComputedStyle(b);let T=0;const E=Math.ceil(parseFloat(A))+Math.ceil(parseFloat($));let B=w+x,I=C;window.innerHeight-B-E<S&&(B=w-S,B<0&&(window.innerHeight-w-x>w?(B=w+x,T=window.innerHeight-B-E-l):(B=l,T=w-B-E))),window.innerWidth-C<N&&window.innerWidth-C<C+V&&(I=C-N+V),document.body.append(b),b.style.cssText=`position:fixed;bottom:unset;left:${I}px
|
|
4
4
|
!important;top:${B}px !important;right: unset;${T?"max-height:"+T+"px;overflow-y:auto;":""}`,T&&(b.className+=" dropdown-menu-maxheight"),b.style.zIndex=p().toString()}},f=()=>{c(r.value,i.value)},u=()=>{t.hover||(a.value=!1,document.removeEventListener("click",u),o.removeEventListener("click",u),document.removeEventListener("scroll",u),o.removeEventListener("scroll",u))};return{show:a,dropdownRef:r,dropdownMenuRef:i,clickEventRef:s,showDropMenu:v=>{t.hover||t.disabled||(v==null||v.stopPropagation(),a.value||setTimeout(()=>{f()}),a.value=!a.value,document.addEventListener("click",u),document.addEventListener("scroll",u),t.hideOnClick||(o.addEventListener("click",b=>{b.stopPropagation()}),o.addEventListener("scroll",b=>{b.stopPropagation()})))},hoverDropdown:v=>{t.hover&&(a.value||setTimeout(()=>{}),a.value=!a.value)},leftButtonClick:()=>{},closeDropMenu:u,selectItem:v=>{n.emit("select",v)},resolveSize:v=>{const b=/px|em|rem|pt|%/;return b.test(v)?`${parseInt(v,10)}${v.match(b)[0]}`:`${v}px`}}}const yx={label:{type:String,default:"XM1"},value:{type:String||Number,default:"项目一"},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},divide:{type:Boolean,default:!1},onSelect:{type:Function,default:()=>{}}},Yd=e.defineComponent({name:"FDropdownItem",props:yx,emits:["select"],setup(t,n){const o=e.ref(t.value),a=e.ref(t.label),r=e.ref(t.disabled),i=e.ref(t.active),s=e.ref(t.divide),l=()=>{r.value||n.emit("select",t)};return()=>e.createVNode("div",null,[e.withDirectives(e.createVNode("div",{class:"dropdown-divider"},null),[[e.vShow,s.value]]),e.createVNode("li",{class:`dropdown-item${i.value?" active":""} ${r.value?" disabled":""}`,onClick:l,title:o.value.toString()},[a.value])])}}),Nr=e.defineComponent({name:"FDropdown",props:Vr,emits:["select"],setup(t,n){const o=e.ref(t.model),{show:a,dropdownMenuRef:r,dropdownRef:i,clickEventRef:s,showDropMenu:l,hoverDropdown:p,leftButtonClick:c,closeDropMenu:f,selectItem:u,resolveSize:d}=Ud(t,n);function m(g){console.log(g),n.emit("select",g)}return()=>e.createVNode("div",{ref:i},[e.createVNode("div",{class:["farris-dropdown","btn-group",{dropup:t.position==="top"},{dropdown:t.position==="bottom"},{dropleft:t.position==="left"},{dropright:t.position==="right"}]},[t.splitButton&&e.createVNode("span",{class:["btn",{"dropdown-item":t.nest},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"}],style:"width:100%",onClick:c},[t.title]),e.createVNode("span",{ref:s,class:["dropdown-toggle",{btn:!t.nest},{"dropdown-item":t.nest},{"dropdown-toggle-split":t.splitButton},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"},{"btn-secondary":t.type==="secondary"},{"btn-link":t.type==="link"},{disabled:t.disabled}],style:"width:100%",onClick:l,onMouseenter:p,onMouseleave:p},[e.withDirectives(e.createVNode("span",{class:"sr-only"},null),[[e.vShow,t.splitButton]]),t.splitButton?"":t.title,e.withDirectives(e.createVNode("span",{class:`f-icon ${t.iconClass.toString()}`},null),[[e.vShow,t.iconClass]])]),e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode("div",{ref:r,class:`dropdown-menu${a.value?" show":""}`},[e.createVNode(e.Fragment,null,[o.value.map(({label:g,value:h,disabled:y,active:v,divide:b})=>e.createVNode(Yd,{value:h.toString(),label:g,disabled:y,active:v,divide:b,onSelect:x=>m(x)},null))])])]})])])}}),bx=e.defineComponent({name:"FDropdownDesign",props:Vr,emits:["select"],setup(t,n){const o=e.ref(t.model),{show:a,showDropMenu:r,hoverDropdown:i,leftButtonClick:s,closeDropMenu:l,selectItem:p,resolveSize:c}=Ud(t,n);function f(g){console.log(g),n.emit("select",g)}const u=e.ref(),d=e.inject("design-item-context"),m=ye(u,d);return e.onMounted(()=>{u.value.componentInstance=m}),n.expose(m.value),()=>e.createVNode("div",{ref:u},[e.createVNode("div",{class:["farris-dropdown","btn-group",{dropup:t.position==="top"},{dropdown:t.position==="bottom"},{dropleft:t.position==="left"},{dropright:t.position==="right"}],style:{width:t.width}},[t.splitButton&&e.createVNode("span",{class:["btn",{"dropdown-item":t.nest},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"}],style:"width:100%",onClick:s},[t.title]),e.createVNode("span",{class:["dropdown-toggle",{btn:!t.nest},{"dropdown-item":t.nest},{"dropdown-toggle-split":t.splitButton},{"btn-lg":t.size==="large"},{"btn-sm":t.size==="small"},{"btn-primary":t.type==="primary"},{"btn-success":t.type==="success"},{"btn-warning":t.type==="warning"},{"btn-danger":t.type==="danger"},{"btn-info":t.type==="info"},{"btn-secondary":t.type==="secondary"},{"btn-link":t.type==="link"},{disabled:t.disabled}],style:"width:100%",onClick:r,onMouseenter:i,onMouseleave:i},[e.withDirectives(e.createVNode("span",{class:"sr-only"},null),[[e.vShow,t.splitButton]]),t.splitButton?"":t.title,e.withDirectives(e.createVNode("span",{class:`f-icon ${t.iconClass.toString()}`},null),[[e.vShow,t.iconClass]])]),e.createVNode("div",{class:`dropdown-menu${a.value?" show":""}`},[e.createVNode(e.Fragment,null,[o.value.map(({label:g,value:h,disabled:y,active:v,divide:b})=>e.createVNode(Yd,{value:h.toString(),label:g,disabled:y,active:v,divide:b,onSelect:x=>f(x)},null))])])])])}}),Zd={install(t){t.component(Nr.name,Nr)},register(t,n,o){t.dropdown=Nr,n.dropdown=Gd},registerDesigner(t,n,o){t.dropdown=bx,n.dropdown=Gd}},vx=new Map([["appearance",ge]]);function xx(t,n,o){return n}const Cx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/filter-bar.schema.json",title:"filter-bar",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for filter-bar",type:"string"},type:{description:"The type string of filter-bar",type:"string",default:"filter-bar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},wx={title:"filter-bar",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}},controlSource:{description:"筛选方式",title:"筛选方式",type:"select",editor:{type:"combo-list",data:[{value:"normal",name:"常规筛选"},{value:"light",name:"轻量筛选"}],valueField:"value",textField:"name",idField:"value"}}}},appearance:{description:"",title:"外观",properties:{showReminder:{description:"启用提示",type:"boolean",title:"启用提示",visible:{anyOf:[{controlSource:{equal:"light"}}]}},showExtendInSidebar:{description:"启用侧边栏收折",type:"boolean",title:"启用侧边栏收折",visible:{anyOf:[{controlSource:{equal:"light"}}]}},clearSelectedText:{description:"按钮“清空已选”的文本",type:"string",title:"按钮“清空已选”的文本",visible:{anyOf:[{controlSource:{equal:"light"}}]}},alLeft:{description:"表单左对齐",type:"boolean",title:"表单左对齐",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},autoWidth:{description:"自动列宽",type:"boolean",title:"自动列宽",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},filterClass:{description:"筛选样式",type:"string",title:"筛选样式",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},autoLabel:{description:"自适应标签宽度",type:"string",title:"自适应标签宽度",visible:{anyOf:[{controlSource:{equal:"normal"}}]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{visible:{description:"是否可见",type:"boolean",title:"是否可见"},disable:{description:"是否禁用",type:"boolean",title:"是否禁用"},fields:{description:"筛选条字段设置",title:"筛选条字段",type:"",$converter:"",editor:{type:"filter-bar-config",source:"filter-bar"}},liveSearch:{description:"实时搜索",type:"boolean",title:"实时搜索",visible:{anyOf:[{controlSource:{equal:"normal"}}]}},defaultEmptyValueSearch:{description:"默认值为空时是否过滤数据",type:"boolean",title:"默认值为空时是否过滤数据"}}}}},Sr={data:{type:Array,default:[{id:"name",fieldCode:"name",fieldName:"名称",compareType:"0",valueType:0,value:"示例1",relation:"1"}]},fields:{type:Array,default:[{id:"name",code:"name",labelCode:"name",name:"名称",editor:{type:"text"}}]},mode:{type:String,default:"editable"},resetText:{type:String,default:"清空已选"},showReset:{type:Boolean,default:!1}},Kd=me(Sr,Cx,vx,xx,wx);class Vx{constructor(n={value:[]}){P(this,"editorType","check-box");P(this,"value");P(this,"valueType","boolean");this.value=n.value}clear(){this.value=[]}setValue(n){this.value=n}getValue(){return this.value}isEmpty(){return this.value.length===0}}class Nx{constructor(n={textValue:"",value:"",valueField:""}){P(this,"editorType","combo-lookup");P(this,"textValue");P(this,"value");P(this,"valueField");P(this,"valueType","text");this.textValue=n.textValue,this.value=n.value,this.valueField=n.valueField}clear(){this.value="",this.valueField="",this.textValue=""}getPropValue(n,o){if(o.length>1){const a=o.shift();return n[a]?this.getPropValue(n[a],o):null}return n[o[0]]}getTextValue(n){const o=n.split("."),a=this.value.split(",").map(r=>this.getPropValue(r,Ee.cloneDeep(o)));return a&&a.length?a.join(","):""}getValue(){const n=this.valueField.split("."),o=this.value.split(",").map(a=>this.getPropValue(a,Ee.cloneDeep(n)));return o&&o.length?o.join(","):""}setValue(n){throw new Error("Method not implemented.")}isEmpty(){return!this.valueField}}class Sx{constructor(n={value:""}){P(this,"editorType","date-picker");P(this,"value");P(this,"valueType","datetime");this.value=n.value}setValue(n){this.value=n.formatted}getValue(){return this.value}isEmpty(){return!this.value}clear(){this.value=void 0}}class Qd{constructor(n={begin:"",end:""}){P(this,"editorType","date-range");P(this,"begin","");P(this,"end","");P(this,"valueType","datetime");this.begin=n.begin,this.end=n.end}clear(){this.begin="",this.end=""}getValue(){return!this.begin||!this.end?"":`${this.begin}~${this.end}`}setValue(n){n.dataRange?(this.begin=n.dataRange.split(n.delimiter)[0],this.end=n.dataRange.split(n.delimiter)[1]):this.clear()}isEmpty(){return!this.begin||!this.end}}class Tx{constructor(n={value:""}){P(this,"editorType","datetime-picker");P(this,"value");P(this,"valueType","datetime");this.value=n.value}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=n.formatted}isEmpty(){return!this.value}}class Dx{constructor(n={value:"",dispalyText:""}){P(this,"editorType","combo-list");P(this,"value");P(this,"valueType","enum");P(this,"displayText");this.displayText=n.dispalyText,this.value=n.value}clear(){this.value="",this.displayText=""}getValue(){return this.displayText}setValue(n){this.displayText=n.dispalyText,this.value=n.value}isEmpty(){return!this.displayText}}class kx{constructor(n={value:[],displayText:"",displayField:"",isInputText:!1}){P(this,"editorType","input-group");P(this,"value");P(this,"valueType","text");P(this,"displayText");P(this,"valueField");P(this,"isInputText");this.value=n.value,this.displayText=n.displayText,this.valueField=n.displayField,this.isInputText=n.isInputText}clear(){this.value=[],this.displayText="",this.valueField=""}getPropValue(n,o){if(o.length>1){const a=o.shift();return n[a]?this.getPropValue(n[a],o):""}return n[o[0]]}getTextValue(n){const o=n.split("."),a=this.value.map(r=>this.getPropValue(r,Ee.cloneDeep(o)));return a&&a.length?a.join(","):""}getValue(){const n=this.valueField.split(".")||[],o=this.value.map(a=>this.getPropValue(a,Ee.cloneDeep(n)));return o&&o.length?o.join(","):""}setValue(n){throw new Error("Method not implemented.")}isEmpty(){return!this.displayText}}class Ax{constructor(n={textValue:"",value:[],valueField:"",isInputText:!1}){P(this,"editorType","lookup");P(this,"textValue");P(this,"value");P(this,"valueField");P(this,"valueType","text");P(this,"isInputText");this.value=n.value,this.valueField=n.valueField,this.textValue=n.textValue,this.isInputText=n.isInputText}clear(){this.value=[],this.valueField="",this.textValue=""}getPropValue(n,o){if(o.length>1){const a=o.shift();return n[a]?this.getPropValue(n[a],o):null}return n[o[0]]}getTextValue(n){const o=n.split("."),a=this.value.map(r=>this.getPropValue(r,o));return a&&a.length?a.join(","):""}getValue(){const n=this.valueField.split("."),o=this.value.map(a=>this.getPropValue(a,n));return o&&o.length?o.join(","):""}setValue(n){throw new Error("Method not implemented.")}isEmpty(){return!this.value.length}}class $x{constructor(n={value:""}){P(this,"editorType","month-picker");P(this,"value");P(this,"valueType","datetime");this.value=n.value}setValue(n){this.value=n.formatted}getValue(){return this.value}clear(){this.value=void 0}isEmpty(){return!this.value}}class Ex{constructor(n={begin:"",end:""}){P(this,"editorType","month-range");P(this,"begin");P(this,"end");P(this,"valueType","datetime");this.begin=n.begin,this.end=n.end}clear(){this.begin="",this.end=""}getValue(){return!this.begin||!this.end?"":`${this.begin}~${this.end}`}setValue(n){n.dataRange?(this.begin=n.dataRange.split(n.delimiter)[0],this.end=n.dataRange.split(n.delimiter)[1]):this.clear()}isEmpty(){return!this.begin||!this.end}}class Bx{constructor(n={begin:null,end:null}){P(this,"editorType","number-range");P(this,"begin");P(this,"end");P(this,"valueType","number");this.begin=n.begin==null?null:parseFloat(n.begin),this.end=n.end==null?null:parseFloat(n.end)}clear(){this.begin=null,this.end=null}getValue(){return{begin:this.begin,end:this.end}}setValue(n){this.begin=n.begin==null?null:parseFloat(n.begin),this.end=n.end==null?null:parseFloat(n.end)}isEmpty(){return this.begin==null&&this.end==null}}class Fx{constructor(n={value:""}){P(this,"editorType","number-spinner");P(this,"value");P(this,"valueType","number");this.value=n.value==null?null:parseFloat(n.value)}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=isNaN(parseFloat(n))?null:n}isEmpty(){return this.value==null}}class Ix{constructor(n={value:null}){P(this,"editorType","radio-group");P(this,"value");P(this,"valueType","enum");this.value=n.value}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=n}isEmpty(){return!this.value}}class Xd{constructor(n={value:""}){P(this,"editorType","text");P(this,"value");P(this,"valueType","text");this.value=n.value}clear(){this.value=void 0}getValue(){return this.value}setValue(n){this.value=n}isEmpty(){return!this.value}}function Tr(){function t(n,o){switch(n){case"check-box":return new Vx(o);case"combo-list":return new Dx(o);case"combo-lookup":return new Nx(o);case"input-group":return new kx(o);case"date-picker":return new Sx(o);case"date-range":return new Qd(o);case"datetime-picker":return new Tx(o);case"datetime-range":return new Qd(o);case"lookup":return new Ax(o);case"month-picker":return new $x(o);case"month-range":return new Ex(o);case"number-range":return new Bx(o);case"number-spinner":return new Fx(o);case"radio-group":return new Ix(o);default:return new Xd(o)}}return{createConditionValue:t}}function Jd(t,n){const o=e.ref([]),a=e.ref([]),r=e.ref([]),i=e.ref(""),s=e.ref(!1),l=e.ref(t.mode),p=new Map,c=Tr();function f(x){return!s.value&&l.value==="display-only"&&!!x.hasValue&&!!x.displayText}function u(x){a.value=x,a.value.reduce((C,w)=>(C.set(w.labelCode,w),C),p)}function d(x){o.value=x.map((C,w)=>{var V;if(typeof C.value=="string"){const N=((V=p.get(C.fieldCode))==null?void 0:V.editor.type)||"text";C.value=c.createConditionValue(N,{value:C.value})}return C.conditionId=w,C})}function m(){const x=a.value.map(C=>({id:C.id,fieldCode:C.code,fieldName:C.name,editor:C.editor}));return o.value.reduce((C,w,V)=>{const N=C.find(S=>S.fieldCode===w.fieldCode);return N&&(N.displayText=w.value.getValue(),N.hasValue=!0),C},x),x}function g(x,C){u(t.fields),d(t.data),r.value=m()}function h(x){r.value=r.value.filter(C=>C.id!==x.id),o.value=o.value.filter(C=>C.fieldCode!==x.fieldCode),a.value=a.value.filter(C=>C.id!==x.id),n.emit("Remove",x.fieldCode)}function y(x){x.displayText="",x.hasValue=!1,o.value=o.value.filter(C=>C.fieldCode!==x.fieldCode),n.emit("Clear",x.fieldCode)}function v(){r.value=[],o.value=[],a.value=[],n.emit("Reset")}function b(){r.value.forEach(x=>{x.displayText="",x.hasValue=!1}),o.value=[],n.emit("Reset")}return g(t.fields,t.data),{clearAll:v,clearFilterItem:y,currentFilterId:i,filterFields:a,filterItems:r,loadFilterItems:g,removeFilterItem:h,reset:b,shouldShowClearButtonInFilterItem:f}}function eu(t,n){function o(){}return()=>e.createVNode("div",{class:"f-filter-list-ellipsis",onClick:a=>void 0},[e.createTextVNode("...")])}function tu(t,n,o){const{clearFilterItem:a,currentFilterId:r,filterItems:i,removeFilterItem:s,shouldShowClearButtonInFilterItem:l}=o,p=e.ref(!1),c=function(m,g){return{"f-filter-item":!0,"f-filter-item-actived":m.hasValue,"f-filter-item-last":g===i.value.length-1,"f-filter-item-edit":m.id===r.value}},f=e.computed(()=>!p.value&&t.mode==="editable");function u(m,g){t.mode==="display-only"?s(g):a(g)}function d(m,g,h){}return(m,g)=>e.createVNode("div",{id:m.id,class:c(m,g),onClick:h=>void 0},[e.createVNode("div",{class:"f-filter-item-inner"},[m.editor.required&&e.createVNode("span",{class:"f-filter-item-required text-danger"},[e.createTextVNode("*")]),e.createVNode("span",{class:"f-filter-item-text"},[m.fieldName]),m.hasValue&&m.displayText&&e.createVNode("span",{class:"f-filter-item-tip"},[e.createTextVNode(":")]),m.hasValue&&m.displayText&&e.createVNode("span",{class:"f-filter-item-content"},[m.displayText]),f.value&&e.createVNode("span",{class:"f-filter-item-arrow f-icon f-icon-arrow-chevron-down"},null)]),l(m)&&e.createVNode("span",{class:"f-filter-item-clear",onClick:h=>u(h,m)},[e.createVNode("span",{class:"f-icon f-icon-close-circle"},null)])])}function nu(t,n,o){const a=e.ref([]),r=e.ref(!1),i=e.ref(""),s=e.ref(t.resetText),l=e.ref(t.showReset),{clearAll:p,reset:c}=o,f=e.computed(()=>r.value&&a.value&&a.value.length>0),u=e.computed(()=>l.value);function d(g){}function m(g){t.mode==="display-only"?p():c()}return()=>e.createVNode("div",{class:"f-filter-toolbars"},[f.value&&e.createVNode("button",{class:"btn btn-link",onClick:g=>void 0},[i.value]),u.value&&e.createVNode("button",{class:"btn btn-link",onClick:g=>m()},[s.value])])}const Do=e.defineComponent({name:"FFilterBar",props:Sr,emits:["Clear","Remove","Reset"],setup(t,n){const o=e.ref(!1),a=e.ref(!1),r=e.ref(!1),i=e.ref(!1),s=Jd(t,n),{filterFields:l,filterItems:p,loadFilterItems:c}=s,f=e.computed(()=>({display:l.value&&l.value.length?"":"none"}));e.watch([()=>t.data,()=>t.fields],([C,w])=>{c(w,C)});const u=e.computed(()=>a.value&&o.value),d=e.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":u.value})),m=e.computed(()=>p.value.length>0),g=tu(t,n,s);function h(){return e.createVNode("div",{class:d.value},[p.value.map((C,w)=>g(C,w))])}const y=e.computed(()=>r.value&&!a.value&&i.value),v=eu(),b=e.computed(()=>!a.value),x=nu(t,n,s);return()=>e.createVNode("div",{class:"f-filter-wrapper",style:f.value},[e.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[e.createVNode("div",{class:"f-filter-main f-utils-fill"},[e.createVNode("div",{class:"f-filter-list-wrapper"},[m.value&&h(),y.value&&v(),b.value&&x()])])])])}}),Mx=e.defineComponent({name:"FFilterBarDesign",props:Sr,emits:["Clear","Remove","Reset"],setup(t,n){const o=e.ref(!1),a=e.ref(!1),r=e.ref(!1),i=e.ref(!1),s=Jd(t,n),{filterFields:l,filterItems:p,loadFilterItems:c}=s,f=e.computed(()=>({display:l.value&&l.value.length?"":"none"})),u=e.ref(),d=e.inject("design-item-context"),m=ye(u,d);e.onMounted(()=>{u.value.componentInstance=m}),n.expose(m.value),e.watch([()=>t.data,()=>t.fields],([N,S])=>{c(S,N)});const g=e.computed(()=>a.value&&o.value),h=e.computed(()=>({"f-filter-list":!0,"f-filter-list-extend":g.value})),y=e.computed(()=>p.value.length>0),v=tu(t,n,s);function b(){return e.createVNode("div",{class:h.value},[p.value.map((N,S)=>v(N,S))])}const x=e.computed(()=>r.value&&!a.value&&i.value),C=eu(),w=e.computed(()=>!a.value),V=nu(t,n,s);return()=>e.createVNode("div",{ref:u,class:"f-filter-wrapper",style:f.value},[e.createVNode("div",{class:"f-filter-wrapper-inner f-utils-fill"},[e.createVNode("div",{class:"f-filter-main f-utils-fill"},[e.createVNode("div",{class:"f-filter-list-wrapper"},[y.value&&b(),x.value&&C(),w.value&&V()])])])])}}),Ox={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution-config.schema.json",title:"query-solution-config",description:"A Farris Container Component",properties:{fields:{description:"The unique identifier for a query solution",type:"array"}}},Dr={title:"query-solution-config",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标识",title:"标识",type:"string",readonly:!0},code:{description:"编号",title:"控件编号",type:"string",readonly:!0},labelCode:{description:"标签",title:"标签",type:"string",readonly:!0},name:{description:"控件名称",title:"控件名称",type:"string"},controlType:{description:"控件类型",title:"控件类型",type:"select",editor:{type:"combo-list",data:[{value:"text",name:"文本"},{value:"single-number",name:"数值"},{value:"number",name:"数值区间"},{value:"dropdown",name:"下拉面板"},{value:"help",name:"弹出帮助"},{value:"combolist-help",name:"下拉帮助"},{value:"date",name:"日期区间"},{value:"radio",name:"单选"},{value:"input-group'",name:"富文本"}],valueField:"value",textField:"name",idField:"value"}}}},control:{description:"",title:"控件",properties:{}}}},Px=new Map([["appearance",ge]]);function _x(t,n,o){return n}const ou={fields:{type:Array,default:[]},modelValue:{type:Array,default:[]},source:{type:String,default:"query-solution"}},Rx=me(ou,Ox,Px,_x,Dr),Lx={width:{type:String,default:"300px"},height:{type:Number,default:10},isWidePanel:{type:Boolean,default:!1},enableSearch:{type:Boolean,default:!0},mode:{type:String,default:"panel"},isPersitOpenState:{type:Boolean,default:!1},isShowPanel:{type:Boolean,default:!1},propertyName:{type:String,default:""},propertyConfig:{type:Array},propertyData:{type:Object,default:{}},showCloseBtn:{type:Boolean,default:!1},selectedTabId:{type:String,default:""},isWhiteTheme:{type:Boolean,default:!0},schema:{type:Object,default:{}}},Hx={category:{type:Object,default:{}},categoryKey:{type:String},propertyData:{type:Object,default:{}},valueChanged:{type:Function},triggerRefreshPanel:{type:Function}},jx={elementConfig:{type:Object,default:{}},category:{type:Object,default:{}}},Wx=e.defineComponent({name:"FPropertyPanelItem",props:jx,emits:["PropertyChange"],setup(t,n){var c;const o=e.ref((c=t.category)==null?void 0:c.categoryId),a=e.ref(t.elementConfig.propertyID),r=e.ref(t.elementConfig.propertyName),i=e.ref(t.elementConfig.editor),s=e.ref(t.elementConfig.propertyValue),l=e.computed(()=>({"farris-group-wrap":!0,"property-item":!0,"d-none":!t.elementConfig.visible()}));e.watch(()=>{var f;return(f=t.elementConfig)==null?void 0:f.propertyValue},f=>{s.value=f});function p(f){t.elementConfig.propertyValue=f,n.emit("PropertyChange",t.elementConfig.propertyID,f)}return()=>e.createVNode("div",{class:l.value},[e.createVNode(zt,{id:a.value,customClass:`${o.value}-${a.value}`,label:r.value,editor:i.value,modelValue:s.value,onChange:p},null)])}}),qx=e.defineComponent({name:"FPropertyPanelItemList",props:Hx,emits:["valueChanged","submitModal","triggerRefreshPanel"],setup(t,n){const o=e.ref(t.category);function a(u){if(!u.hideCascadeTitle)return e.createVNode("div",{class:"farris-input-wrap"},[e.createVNode("input",{title:"summary",type:"input",class:"form-control form-control-sm",value:u.cascadeSummary,readonly:!0},null)])}function r(u,d){d.isExpand=!d.isExpand}function i(u){return e.createVNode("div",{class:"landscape"},[e.createVNode("button",{title:"expand-button",class:["btn f-btn-collapse-expand f-btn-mx px-1",{"f-state-expand":u.isExpand}],onClick:d=>r(d,u)},[e.createVNode("span",null,null)])])}function s(u){return e.createVNode("div",{class:"f-section-formgroup-legend"},[e.createVNode("div",{class:"f-header px-0 my-0 col-form-label",style:"font-size: inherit;"},[e.createVNode("div",{class:"wrap"},[e.createVNode("span",{class:["f-icon mr-1",{"f-icon-arrow-60-right":!u.isExpand,"f-icon-arrow-60-down":u.isExpand}]},null),e.createVNode("span",{class:"farris-label-text"},[u.propertyName])])])])}function l(u){return`${t.categoryKey}_${u.propertyID}`}function p(u){return e.createVNode("div",{class:"px-2 mb-2"},[e.createVNode(Wx,{key:l(u),elementConfig:u,category:o.value},null)])}function c(u){var d;return e.createVNode("div",{class:"propertyCascadeItem farris-panel px-2 mb-2"},[e.createVNode("div",{class:["farris-panel-item card",{hidden:!u.isExpand}]},[e.createVNode("div",{class:"card-header",onClick:m=>r(m,u)},[e.createVNode("div",{class:"panel-item-title"},[e.createVNode("div",{class:"form-group farris-form-group line-item"},[s(u),a(u),i(u)])])]),e.createVNode("div",{class:["card-body",{hidden:!u.isExpand}]},[(d=u.cascadeConfig)==null?void 0:d.map(m=>p(m))])])])}e.watch(()=>t.category,()=>{o.value=t.category});function f(u){return u.propertyType==="cascade"?c:p}return()=>e.createVNode(e.Fragment,null,[o.value.properties.map(u=>f(u)(u))])}}),kr=e.defineComponent({name:"FPropertyPanel",props:Lx,emits:[],setup(t,n){const o=e.ref(t.width),a=e.ref(t.isWidePanel),r=e.ref(t.enableSearch),i=e.ref(t.mode),s=e.ref(t.isPersitOpenState),l=e.ref(t.isShowPanel),p=e.ref(),c=e.ref(),f=e.ref(t.showCloseBtn),u=e.ref(t.selectedTabId),d=e.ref(!0),m=e.ref(t.isWhiteTheme);let g=[],h=[];const y=e.ref(""),v=e.ref(),b=e.ref(),x=e.inject("SchemaService");let C=[],w;function V(){h=[],w&&w.categoryList&&Array.isArray(w.categoryList)&&w.categoryList.length>0&&w.categoryList.forEach(X=>{if(X.properties.forEach(ie=>ie.categoryId=X.categoryId),X.properties&&Array.isArray(X.properties)&&X.properties.length>0){const ie=X.properties.map(de=>(de.category=X,de));h=h.concat(ie)}})}function N(U){let X=U.offsetTop,ie=U.offsetParent;for(;ie!==null;)X+=ie.offsetTop,ie=ie.offsetParent;return X}function S(U,X){U&&X&&Object.keys(X).length>0&&Object.keys(X).forEach(ie=>{var ne;const de=X[ie];(ne=U.style)==null||ne.setProperty(ie,de)})}function D(){return h.filter(X=>X.visible?!!(X.propertyID&&X.propertyID.startsWith(y.value)||X.propertyName&&(X.propertyName.startsWith(y.value)||X.propertyName.includes(y.value))):!1)}function k(U,X,ie){if(U===0){const de=N(X),oe=N(ie)-de-5;X==null||X.scroll({top:oe,behavior:"smooth"})}}function A(U){C&&C.length>0&&(C.forEach(ie=>{ie.style.cssText=""}),C=[]),y.value=U||y.value;const X=document.querySelector(".panel-body");if(!y.value)v.value&&X&&(X.scrollTop=0);else if(V(),h&&h.length>0){const ie=D();ie&&ie.length>0&&(ie[0].category.status==="closed"&&(ie[0].category.status="open"),setTimeout(()=>{ie.forEach((de,ne)=>{const oe=de.propertyType==="cascade"?`.${de.categoryId}-${de.propertyID} div.col-form-label`:`.property-item .${de.categoryId}-${de.propertyID} label.col-form-label`,ee=document.querySelector(oe);ee&&(k(ne,X,ee),S(ee,{color:"#5B89FE"}),C.push(ee))})},50))}}function $(U){A(U)}function T(U){const{value:X}=U.target;U.key==="Enter"&&$(X)}function E(U){const{value:X}=U.target;$(X)}function B(){s.value||(d.value=!1),n.emit("closePropertyPanel")}function I(U){y.value="",A()}function F(U){!U.status||U.status==="open"?U.status="closed":U.status="open"}function R(){var U;if(g=[],!p.value||p.value.length===0){g=[{tabId:"default",tabName:"属性",categoryList:[]}],w=null;return}if((U=p==null?void 0:p.value)==null||U.forEach(X=>{if(X.tabId){const ie=g.find(de=>de.tabId===X.tabId);ie?(ie.categoryList.push(X),ie.hide&&(ie.hide=X.hide||X.properties.length===0)):g.push({tabId:X.tabId,tabName:X.tabName,categoryList:[X],hide:X.hide||X.properties.length===0})}else{const ie=g.find(de=>de.tabId==="default");ie?ie.categoryList.push(X):g.push({tabId:"default",tabName:"属性",categoryList:[X]})}}),u.value){let X=g==null?void 0:g.find(ie=>ie.tabId===u.value&&!ie.hide);X=X||g[0]}else w=g[0];u.value=w==null?void 0:w.tabId}e.watch(()=>[t.schema,t.isShowPanel],()=>{c.value=t.schema,p.value=ol(c.value,x),R(),I(y.value)}),e.onMounted(()=>{R()});function O(U,X){(!c.value||X)&&(c.value=X||t.schema),p.value=ol(c.value,x,U),R(),I(y.value)}function W(){i.value=i.value==="panel"?"sidebar":"panel",i.value==="panel"?(setTimeout(()=>{$()},100),o.value="300px"):o.value="41px"}function M(){if(f.value)return e.createVNode("div",{class:"title-actions"},[e.createVNode("div",{class:"monaco-toolbar"},[e.createVNode("div",{class:"monaco-action-bar animated"},[e.createVNode("ul",{class:"actions-container",role:"toolbar"},[e.createVNode("li",{class:"action-item",onClick:B},[e.createVNode("span",{class:"f-icon f-icon-close"},null)])])])])])}function _(){R()}function H(){if(r.value)return e.createVNode("div",{class:"search"},[e.createVNode("div",{class:"input-group f-state-editable border-left-0 border-right-0"},[e.createVNode("input",{class:"form-control f-utils-fill text-left pt-3 pb-3 textbox",type:"text",placeholder:"输入属性名称或编号快速定位",autocomplete:"off",onKeyup:U=>T(U),value:y.value},null),e.createVNode("div",{class:"input-group-append",style:"margin-left: 0px;"},[e.createVNode("span",{class:"input-group-text input-group-clear",style:[{display:y.value&&y.value.length>0?"":"none"}],onClick:U=>I()},[e.createVNode("i",{class:"f-icon modal_close"},null)]),e.createVNode("span",{class:"input-group-text input-group-clear",onClick:U=>E(U)},[e.createVNode("i",{class:"f-icon f-icon-search"},null)])])])])}function L(U){return`${t.propertyName}_${U.categoryId}`}function G(){var U;return e.createVNode("div",{class:"panel-body",ref:b},[e.createVNode("ul",{class:["property-grid",{"wide-panel":a.value}]},[(U=p.value)==null?void 0:U.map(X=>e.createVNode("li",{key:L(X)},[!X.hide&&!X.hideTitle&&e.createVNode("span",{class:"group-label",onClick:()=>F(X)},[e.createVNode("span",{class:["f-icon mr-2",{"f-legend-show":X.status==="closed"},{"f-legend-collapse":X.status==="open"||X.status===void 0}]},null),X.categoryName]),e.createVNode("div",{hidden:X.status==="closed"},[e.createVNode(qx,{category:X,propertyData:c.value,triggerRefreshPanel:_},null)])]))])])}function Y(){if(i.value==="sidebar")return e.createVNode("div",{class:"side-panel h-100",onClick:W},[e.createVNode("i",{class:"f-icon f-icon-engineering w-100 icon"},null),e.createVNode("span",null,[e.createTextVNode("属性")])])}function z(){return{display:d.value?"block":"none",width:o.value}}function q(){return e.createVNode("div",{class:"switcher"},[e.createVNode("i",{class:"f-icon f-icon-exhale-discount",style:[{transform:i.value==="sidebar"?"none":"rotate(180deg)"}],onClick:W},null)])}function j(U){w=U,u.value=w.tabId,y.value=""}function Z(){return g.map(U=>e.createVNode("div",{class:["title-label",{active:w&&w.tabId===U.tabId},{hidden:U.hide}],onClick:X=>j(X)},[e.createVNode("span",null,[U.tabName])]))}return e.onMounted(()=>{$(y.value)}),e.onBeforeMount(()=>{s.value&&(d.value=l.value),R(),$(y.value)}),n.expose({updatePropertyConfig:O}),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{ref:v,class:["property-panel",{"white-theme":m.value}],style:z()},[e.createVNode("div",{class:"propertyPanel panel flex-column",hidden:i.value!=="panel"},[e.createVNode("div",{class:["title d-flex",{"p-right":f.value},{only:g.length===1}]},[Z(),M()]),H(),G()]),q(),Y()])])}}),au={text:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"}},"single-number":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},maxValue:{description:"最大值",title:"最大值",type:"number"},minValue:{description:"最小值",title:"最小值",type:"number"}},number:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},precision:{description:"精度",title:"精度",type:"number"},maxValue:{description:"最大值",title:"最大值",type:"number"},minValue:{description:"最小值",title:"最小值",type:"number"}},dropdown:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},uri:{description:"uri",title:"uri",type:"string"},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"},valueType:{description:"值类型",title:"值类型",type:"select",editor:{type:"combo-list",data:[{value:"int",name:"整型"},{value:"string",name:"字符串"},{value:"boolean",name:"布尔"}]}},enumValue:{description:"枚举项",title:"枚举项",type:"string"}},help:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},helpId:{description:"帮助元数据",title:"帮助元数据",type:"string"},uri:{description:"uri",title:"uri",type:"string"},textField:{description:"文本字段",title:"文本字段",type:"string"},valueField:{description:"值字段",title:"值字段",type:"string"},idField:{description:"标识字段",title:"标识字段",type:"string"},mapFields:{description:"映射",title:"映射",type:"string"},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"},panelWidth:{description:"面板宽度",title:"面板宽度",type:"number"},panelHeight:{description:"面板高度",title:"面板宽度",type:"number"}},"combolist-help":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},helpId:{description:"帮助元数据",title:"帮助元数据",type:"string"},uri:{description:"uri",title:"uri",type:"string"},textField:{description:"文本字段",title:"文本字段",type:"string"},valueField:{description:"值字段",title:"值字段",type:"string"},idField:{description:"标识字段",title:"标识字段",type:"string"},mapFields:{description:"映射",title:"映射",type:"string"},multiSelect:{description:"是否多选",title:"是否多选",type:"boolean"},editable:{description:"允许编辑",title:"允许编辑",type:"boolean"},nosearch:{description:"任意输入",title:"任意输入",type:"boolean"},displayFields:{description:"展示字段",title:"展示字段",type:"string"},clearFields:{description:"值变化时清空字段",title:"值变化时清空字段",type:"string"},dialogTitle:{description:"面板标题",title:"面板标题",type:"string"},panelWidth:{description:"面板宽度",title:"面板高度",type:"number"},panelHeight:{description:"面板高度",title:"面板宽度",type:"number"},enableMultiFieldSearch:{description:"多字段查询",title:"多字段查询",type:"boolean"}},date:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"single-date":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"date-time":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"single-date-time":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},month:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},"single-year":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},returnFormat:{description:"查询格式",title:"查询格式",type:"string"},format:{description:"显示格式",title:"显示格式",type:"string"}},radio:{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"},horizontal:{description:"是否水平布局",title:"是否水平布局",type:"boolean"},showLabel:{description:"是否显示标签",title:"是否显示标签",type:"boolean"}},"input-group":{className:{description:"样式",title:"样式",type:"string"},require:{description:"必填",title:"是否必填",type:"boolean"}}};function zx(t,n,o,a){const r=e.ref(),i=e.ref("query-solution-config"),s=e.ref({}),l=e.ref(),p=e.ref(null);e.watch(o,g=>{if(g&&g.controlType){const h={...Dr},{controlType:y}=g;h.categories.control.properties=au[y],p.value=a.value[g.id],r.value.updatePropertyConfig(h,p.value)}});function c(g){return{id:g.id,code:g.code||g.id,labelCode:g.name,name:g.name,controlType:g.controlType}}function f(g){const h={className:"",require:!1};let y={};switch(g){case"text":break;case"number":case"single-number":y={precision:2,maxValue:null,minValue:null};break;case"dropdown":y={uri:"",valueType:"string",enumValue:[],multiSelect:!1};break;case"help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"combolist-help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,editable:!1,nosearch:!1,clearFields:"",dialogTitle:"",panelWidth:null,panelHeight:null,enableMultiFieldSearch:!1};break;case"date":case"single-date":case"date-time":case"single-date-time":case"month":case"single-year":y={format:"yyyy-MM-dd",returnFormat:"yyyy-MM-dd"};break;case"radio":y={horizontal:!1,showLabel:!1};break}return{...h,...y}}function u(g){const h={className:"",require:!1,isExtend:!1};let y={};switch(g){case"text":break;case"number":case"single-number":y={precision:2,maxValue:null,minValue:null};break;case"dropdown":y={uri:"",valueType:"string",enumValue:[],multiSelect:!1};break;case"help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,panelHeight:null};break;case"combolist-help":y={helpId:"",uri:"",textField:"",valueField:"",idField:"",mapFields:"",multiSelect:!1,editable:!1,nosearch:!1,clearFields:"",dialogTitle:"",panelWidth:null,panelHeight:null,enableMultiFieldSearch:!1};break;case"date":case"single-date":case"date-time":case"single-date-time":case"month":case"single-year":y={format:"yyyy-MM-dd",returnFormat:"yyyy-MM-dd"};break;case"radio":y={horizontal:!1,showLabel:!1};break}return{...h,...y}}function d(g){return t.source==="query-solution"?f(g):u(g)}e.watch(()=>{var g;return(g=p.value)==null?void 0:g.controlType},g=>{const h=c(o.value);h.controlType=g,p.value={...h,...d(g)},a.value[o.value.id]=p.value;const y={...Dr};y.categories.control.properties=au[g],r.value.updatePropertyConfig(y,p.value)});function m(){return e.createVNode(e.Fragment,null,[e.createVNode(kr,{propertyConfig:l.value,ref:r,propertyName:i.value,schema:s.value},{default:()=>[e.createTextVNode(" ")]})])}return{renderPanel:m,PropertyPanelInstance:r,getExtendSchemaProerty:d,getBasicSchemaProerty:c}}const Gx=[{id:"text",name:"文本",controlType:"text"},{id:"single-number",name:"数值",controlType:"single-number"},{id:"number",name:"数值区间",controlType:"number"},{id:"dropdown",name:"下拉面板",controlType:"dropdown"},{id:"help",name:"弹出帮助",controlType:"help"},{id:"combolist-help",name:"下拉帮助",controlType:"combolist-help"},{id:"date",name:"日期区间",controlType:"date"},{id:"single-date",name:"单日期",controlType:"single-date"},{id:"date-time",name:"日期时间区间",controlType:"date-time"},{id:"single-date-time",name:"单日期时间",controlType:"single-date-time"},{id:"month",name:"月份",controlType:"month"},{id:"single-year",name:"年份",controlType:"single-year"},{id:"radio",name:"单选",controlType:"radio"},{id:"input-group",name:"富文本",controlType:"input-group"}];function Ux(t,n,o,a,r){const i=e.ref(!1),s=e.ref(),l=e.ref([]),p=e.ref([]),c=e.ref([]),{getExtendSchemaProerty:f,getBasicSchemaProerty:u}=r;function d(x){o.value=x.length?x[0]:null}function m(x){p.value=x}function g(){return Gx}function h(){c.value=g();const x={},C=Ee.cloneDeep(t.modelValue)||[];p.value=[],c.value.forEach(w=>{const V=C.find(N=>N.id===w.id);V?(x[w.id]={id:V.id,code:V.code,labelCode:V.labelCode,name:V.name,controlType:V.editor.type,...V.editor},delete x[w.id].type,p.value.push(x[w.id])):x[w.id]={...u(w),...f(w.controlType)}}),a.value=x,i.value=!0,s.value=Ee.cloneDeep(x),l.value=Ee.cloneDeep(p.value)}function y(){const x=[];p.value.forEach(C=>{const w=a.value[C.id];if(w){const{id:V,code:N,labelCode:S,name:D,...k}=w;k.type=k.controlType,delete k.controlType;const A={id:V,code:N,labelCode:S,name:D,editor:k};x.push(A)}}),n.emit("update:modelValue",x),l.value=Ee.cloneDeep(p.value)}function v(){p.value=Ee.cloneDeep(l.value)}function b(){return i.value?e.createVNode(wn,{selections:p.value,"data-source":c.value,class:"query-solution-config-transfer",onActiveChange:d,onChange:m},null):null}return{renderTransfer:b,initData:h,selectPanels:p,confirm:y,cancel:v}}const ko=e.defineComponent({name:"FQuerySolutionConfig",props:ou,emits:["update:modelValue"],setup(t,n){const o=e.ref(null),a=e.computed(()=>"共"+t.modelValue.length+"项"),r=e.ref(),i=zx(t,n,o,r),{renderPanel:s}=i,{renderTransfer:l,initData:p,confirm:c,cancel:f,selectPanels:u}=Ux(t,n,o,r,i),d={fitContent:!1,width:900,height:600,title:"筛选方案配置",acceptCallback:m,rejectCallback:g};function m(){c()}function g(){f()}function h(){return e.createVNode(e.Fragment,null,[l(),s()])}return e.onMounted(()=>{p()}),()=>e.createVNode(dt,{id:t.id,"button-behavior":"Modal","modal-options":d,modelValue:a.value,"onUpdate:modelValue":y=>a.value=y},{default:()=>[e.createVNode("div",{class:"query-solution-config d-flex f-utils-absolute-all"},[h()])]})}}),Yx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/filter-bar-config.schema.json",title:"filter-bar-config",description:"A Farris Container Component",properties:{fields:{description:"The unique identifier for a query solution",type:"array"}}},Zx={title:"filter-bar-config",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标识",title:"标识",type:"string",readonly:!0},code:{description:"编号",title:"控件编号",type:"string",readonly:!0},labelCode:{description:"标签",title:"标签",type:"string",readonly:!0},name:{description:"控件名称",title:"控件名称",type:"string"},controlType:{description:"控件类型",title:"控件类型",type:"select",editor:{type:"combo-list",data:[{value:"text",name:"文本"},{value:"single-number",name:"数值"},{value:"number",name:"数值区间"},{value:"dropdown",name:"下拉面板"},{value:"help",name:"弹出帮助"},{value:"combolist-help",name:"下拉帮助"},{value:"date",name:"日期区间"},{value:"radio",name:"单选"},{value:"input-group'",name:"富文本"}],valueField:"value",textField:"name",idField:"value"}}}},control:{description:"",title:"控件",properties:{}}}},Kx=new Map([["appearance",ge]]);function Qx(t,n,o){return n}const Xx=me({fields:{type:Array,default:[]},modelValue:{type:Array,default:[]}},Yx,Kx,Qx,Zx),ru={install(t){t.component(Do.name,Do)},register(t,n,o){t["filter-bar"]=Do,n["filter-bar"]=Kd,t["filter-bar-config"]=ko,n["filter-bar-config"]=Xx},registerDesigner(t,n,o){t["filter-bar"]=Mx,n["filter-bar"]=Kd}},Jx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/field-selector.schema.json",title:"field-selector",description:"A Farris Input Component",type:"object",properties:{}},Ar={disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},bindingType:{type:Object,default:{enable:!0,data:[{value:"Form",text:"绑定字段"},{value:"LocaleVariable",text:"绑定组件变量"},{value:"RemoteVariable",text:"绑定表单变量"}],value:"Form",textField:"text",valueField:"value"}},data:{type:Array,default:[]},idField:{type:String,default:"id"},columns:{type:Array,default:[{field:"code",title:"绑定字段"},{field:"name",title:"名称"},{field:"fieldType",title:"字段类型"}]},title:{type:String,default:"字段选择器"},modalWidth:{type:Number,default:600},modalHeight:{type:Number,default:500},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},bindingData:{type:Array,default:[]},textField:{type:String,default:"code"}},eC=me(Ar,Jx),tC=new Map([["appearance",ge],["column","columnOption"]]);function nC(t,n,o){var u;const a=o.parentComponentInstance,r=a.schema.type,i=String(((u=a.schema.appearance)==null?void 0:u.class)||"").split(" "),s=r==="section"||r==="tab-page",l=i.includes("f-page-content-nav"),p=i.includes("f-page-main"),c=t.getSchemaByType("component");c.id=`${n.id}-component`,c.componentType="data-grid";let f="";return f+=s?"f-struct-data-grid-in-card f-struct-is-subgrid":"",f+=l?"f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column":"",f+=p?"f-struct-data-grid f-struct-wrapper":"",c.appearance={class:f},c.contents=[n],c}function oC(t,n,o){const a=o.parentComponentInstance,r=String(a.schema.appearance.class||"").split(" "),i=r.includes("f-page-content-nav"),s=r.includes("f-page-main"),l=t.getSchemaByType("section");l.id=`${n.id}-section`;let p="";return p+=i?"f-section-in-nav ":"",p+=s?"f-section-in-managelist ":"",p+="f-section-grid",l.appearance={class:p},l.contents=[n],l}function aC(t,n,o){const a=t.getSchemaByType("content-container");return a.id=`${n.id}-layout`,a.appearance={class:"f-grid-is-sub f-utils-flex-column"},a.contents=[n],a}function rC(t,n,o){const r=o.parentComponentInstance.schema.type,i=r==="section"||r==="tab-page";n.appearance={class:"f-component-grid"};const l=(i?aC:oC)(t,n,o);return nC(t,l,o)}const iC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-grid.schema.json",title:"tree-grid",description:"A Farris Data Grid Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"data-grid"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},dataSource:{description:"",type:"string",default:""},columns:{description:"",type:"array",default:[]},identifyField:{description:"",type:"string"},editable:{description:"",type:"boolean",default:!1},disable:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},cell:{type:"object",properties:{highlightFocusingCell:{description:"",type:"boolean",default:!1},mergeCell:{description:"",type:"boolean",default:!1},showEditableIcon:{description:"",type:"boolean",default:!1}}},column:{type:"object",properties:{fitColumns:{description:"",type:"boolean",default:!1},fitMode:{description:"",type:"string",default:"average"},groups:{description:"",type:"array",default:[]},reorderColumn:{description:"Enable to drag column to reorder",type:"boolean",default:!1},resizeColumn:{type:"boolean",default:!0},resizeColumnOnDoubleClick:{description:"",type:"boolean",default:!0}}},command:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},commands:{type:"array",default:[]},commandColumnWidth:{description:"",type:"number",default:120},onClickDeleteCommand:{description:"",type:"string",default:""},onClickEditCommand:{description:"",type:"string",default:""}}},contextMenu:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},customizaiton:{type:"object",properties:{enableScheme:{description:"",type:"boolean",default:!1},enableSetting:{description:"",type:"boolean",default:!1}}},edit:{type:"obejct",properties:{mode:{description:"",type:"string",default:"cell",enum:["cell","row","card"]},selectOnEditing:{description:"",type:"boolean",default:!1},onAppendRow:{description:"",type:"string",default:""},onBeforeEdit:{description:"",type:"string",default:""}}},filter:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},filterStyle:{description:"",type:"string",default:"filter-column",enum:["filter-column","filter-row"]},mode:{description:"",type:"string",default:"server",enum:["client","server"]},showSummary:{description:"",type:"boolean",default:!0},onFilterChange:{description:"",type:"string",default:""}}},footer:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customFooterStyle:{description:"",type:"object"},footerDataCommand:{description:"",type:"string",default:""},footerDataFrom:{description:"",type:"string",default:"client"},footerHeight:{description:"",type:"number",default:29},footerPosition:{description:"",type:"string",default:"bottom"},footerTemplate:{description:"",type:"string",default:""}}},group:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customGroupRow:{description:"",type:"object"},customGroupRowStyle:{description:"",type:"obejct"},customSummaryStyle:{description:"",type:"obejct"},groupColSpan:{description:"",type:"number",default:1},groupFields:{description:"",type:"array",default:[]},showGroupedColumn:{description:"",type:"boolean",default:!0},showGroupPanel:{description:"",type:"boolean",default:!1},showSummary:{description:"",type:"boolean",default:!1},summaryPosition:{description:"",type:"string",default:"separate",enum:["separate","merge-to-group"]},disableGroupOnEditing:{description:"",type:"boolean",default:!0},expandGroupRows:{description:"",type:"boolean",default:!0}}},header:{type:"object",properties:{wrapHeadings:{description:"",type:"boolean",default:!1}}},pagination:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},disablePagination:{description:"",type:"string",default:""},contentTemplate:{description:"",type:"string",default:""},index:{description:"",type:"number",default:1},mode:{description:"",type:"string",default:"server",enum:["server","client"]},showGoto:{description:"",type:"boolean",default:!1},showIndex:{description:"",type:"boolean",default:!0},showLimits:{description:"",type:"boolean",default:!1},showPageInfo:{description:"",type:"boolean",default:!0},size:{description:"",type:"number",default:20},sizeLimits:{description:"",type:"array",default:[10,20,30,50,100]},onPageChange:{description:"",type:"string",default:""},onPageSizeChange:{description:"",type:"string",default:""}}},row:{type:"object",properties:{customRowStyle:{description:"",type:"object"},disable:{description:"",type:"obejct"},height:{description:"",type:"number",default:30},showHovering:{type:"boolean",default:!0},wrapContent:{type:"boolean",default:!1}}},rowNumber:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},heading:{description:"",type:"string",default:"序号"},width:{description:"",type:"number",default:36},onClickRow:{description:"",type:"string",default:""},onDoubleClickRow:{description:"",type:"string",default:""}}},selection:{type:"object",properties:{enable:{description:"",type:"boolean",default:!0},checkOnSelect:{description:"",type:"boolean",default:!1},clearSelectionOnEmpty:{description:"",type:"boolean",default:!0},customSelectionItem:{description:"",type:"object"},focusSelection:{description:"",type:"string",default:"current",enum:["current","all"]},keepSelectingOnClick:{description:"",type:"boolean",default:!0},keepSelectingOnPaging:{description:"",type:"boolean",default:!0},multiSelect:{description:"",type:"boolean",default:!1},selectionMode:{description:"",type:"string",default:"default"},selectOnCheck:{description:"",type:"boolean",default:!1},selectOnEditing:{description:"",type:"boolean",default:!1},showCheckbox:{description:"",type:"boolean",default:!1},showCheckAll:{description:"",type:"boolean",default:!1},showSelection:{description:"",type:"boolean",default:!1},onBeforeSelect:{description:"",type:"string",default:""},onBeforeUnCheck:{description:"",type:"",default:""},onBeforeUnSelect:{description:"",type:"string",default:""},onCheckAll:{description:"",type:"string",default:""},onChecked:{description:"",type:"string",default:""},onSelectionChange:{description:"",type:"string",default:""},onUnCheckAll:{description:"",type:"string",default:""},onUnChecked:{description:"",type:"string",default:""},onCheckedChange:{description:"",type:"string"}}},sort:{type:"object",properties:{enable:{description:"",type:"boolean",default:!1},fields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},multiSort:{description:"",type:"boolean",default:!1}}},summary:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1},customSummaryStyle:{description:"",type:"object"},groupFields:{description:"",type:"array",default:[]},mode:{description:"",type:"string",default:"client",enum:["client","server"]},position:{description:"",type:"boolean",default:"bottom",enum:["bottom","top","both"]}}},toolbar:{description:"",type:"object",properties:{enable:{description:"",type:"boolean",default:!1}}},visualization:{autoHeight:{description:"",type:"boolean",default:!1},emptyDataHeight:{description:"",type:"number",default:36},emptyTemplate:{description:"",type:"string",default:""},maxHeight:{description:"",type:"number",default:300},scrollBarShowMode:{description:"",type:"string",default:"auto"},showBorder:{description:"",type:"boolean",default:!1},showScrollArrow:{description:"",type:"boolean",default:!1},striped:{description:"",type:"boolean",default:!0},useBlankWhenDataIsEmpty:{description:"",type:"boolean",default:!1}}},required:["id","type"]},sC={title:"tree-grid",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},iu={columns:{type:Array,default:[]},displayField:{type:String,default:"name"},showLines:{type:Boolean,default:!1},columnOption:{type:Object},data:{type:Array,default:[]},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editOption:{type:Object,default:{selectOnEditing:!1,editMode:"cell"}},fit:{type:Boolean,default:!1},header:{type:Object},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},pagination:{type:Object,default:{enable:!0,size:-1}},rowNumber:{type:Object,default:{enable:!0,width:32,heading:"序号"}},rowOption:{type:Object,default:{wrapContent:!1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showBorder:{type:Boolean,default:!1},showOptions:{type:Boolean,default:!1},showScrollBar:{type:String,default:"auto"},showStripe:{type:Boolean,default:!0},showTreeNodeIcons:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},width:{type:Number,default:-1},newDataItem:{type:Function,default:()=>{}},commandOption:{type:Object,default:{enable:!1,commands:[]}},hierarchy:{type:Object,default:{cascadeOption:{autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},autoCheckChildren:{type:Boolean,default:!1},showSetting:{type:Boolean,default:!1}},lC=me(iu,iC,tC,rC,sC);function cC(t,n,o,a,r,i,s,l,p,c,f,u,d,m,g,h){const{calculateCellPositionInRow:y}=i,{columnContext:v,hasLeftFixedColumn:b,hasRightFixedColumn:x}=s,{gridDataStyle:C,leftFixedGridDataStyle:w,rightFixedGridDataStyle:V}=m,{renderDataRow:N}=gm(t,n,v,h,l,p,c,f,u,d),S=[N];function D(E,B){const I=y(E);return h.value.filter(F=>F.visible!==!1).map(F=>S[F.type](F,I,B))}function k(){return e.createVNode("div",{ref:a,class:"fv-grid-content-left-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:w.value},[D(v.value.leftColumns.filter(E=>E.visible),"left")])])}function A(){return e.createVNode("div",{ref:o,class:"fv-grid-content-primary"},[e.createVNode("div",{class:"fv-grid-data",style:C.value},[D(v.value.primaryColumns.filter(E=>E.visible),"primary")])])}function $(){return e.createVNode("div",{ref:r,class:"fv-grid-content-right-fixed"},[e.createVNode("div",{class:"fv-grid-data",style:V.value},[D(v.value.rightColumns.filter(E=>E.visible),"right")])])}function T(){const E=[];return b.value&&E.push(k()),E.push(A()),x.value&&E.push($()),E}return{renderDataArea:T}}const On=e.defineComponent({name:"FTreeGrid",props:iu,emits:["selectionChange"],setup(t,n){var We;const a=e.ref(),r=e.ref(),i=e.ref(),s=e.ref(),l=e.ref(),p=e.ref([]),c=e.ref(!1),f=e.ref(((We=t.rowOption)==null?void 0:We.wrapContent)||!1),u=Xt(t),d=vn(t,u),m=Xo(),g=Ut(t),h=Gt(t,new Map,g,u),y=Jt(t,h,u,p,n),v=Ii(t,p,u,y,n),b=e.computed(()=>t.disable),x=e.computed(()=>h.dataView.value.length),{containerStyleObject:C}=qn(t),w=Is(t),V=e.ref(t.columns),{applyCommands:N}=w;N(V);const S=zn(t),D=Ls(),{applyColumnSorter:k,columnContext:A,updateColumnRenderContext:$}=S;k(h,D);const T=Ps(t,A),E=Qt(t,u),B=Pt(),I=Zt(t,E,B),F=Kt(t,E,g,u,B,I),R=Yt(t,V,h,x,0,F),{getVisualData:O}=R,W=bn(t,A),M=Rs(t,y),{sidebarWidth:_}=M;p.value=O(0,x.value+0-1);const H=Gn(t,h,p,A,R,x,0,_),{onWheel:L,dataGridWidth:G,viewPortHeight:Y,viewPortWidth:z}=H,q=Os(t,A,r,z,T),{calculateColumnsSize:j}=q,Z=_s(),U=Fs(r,l,h,Z,H),X=Un(t,n,y,u),ie=Ms(t,n,S,h,T,d,H),de=e.computed(()=>({"fv-grid":!0,"fv-grid-bordered":t.showBorder,"fv-datagrid-strip":t.showStripe})),ne=e.computed(()=>({"fv-grid-content":!0,"fv-grid-content-hover":c.value,"fv-grid-wrap-content":f.value})),{renderDataArea:oe}=cC(t,n,i,s,l,W,S,h,E,g,X,y,v,H,R,p),{renderGridHeader:ee,renderGridColumnResizeOverlay:K}=ks(t,r,s,l,S,h,ie,U,m,Z,q,T,y,M,D,H,z,p),{renderDataGridSidebar:se}=Es(t,X,y,M,H),{renderDisableMask:ue}=As(),{renderHorizontalScrollbar:Te}=$s(t,r,H),{renderVerticalScrollbar:ke}=Bs(t,r,H);function _e(){var be,ze;Y.value=((be=i.value)==null?void 0:be.clientHeight)||0,G.value=((ze=r.value)==null?void 0:ze.clientWidth)||0,j()}e.onMounted(()=>{r.value&&(Zn.useResizeObserver(r.value,_e),j(),e.nextTick(()=>{r.value&&(G.value=r.value.clientWidth),i.value&&(z.value=i.value.clientWidth,Y.value=i.value.clientHeight)}))}),e.onUnmounted(()=>{}),e.watch(z,()=>{r.value&&j()});function te(){const be=y.getSelectionRow();return be?be.dataIndex-1:-1}function ce(){const be=te();h.insertNewDataItem(be),p.value=O(0,x.value+0-1)}function pe(){const be=te();h.insertNewChildDataItem(be),p.value=O(0,x.value+0-1)}function we(){const be=te(),ze=v.getNextSelectableHierarchyItemId(be);h.removeHierarchyDataItem(be),p.value=O(0,x.value+0-1),ze&&y.selectItemById(ze)}function He(be){E.onEditingRow(be)}function le(be){E.acceptEditingRow(be)}function he(be){E.cancelEditingRow(be)}function Ne(be){be&&(V.value=be,N(V),$(V.value),k(h,D),j())}function Fe(be){be&&(h.load(be),p.value=O(0,x.value+0-1))}function Ue(be){y.selectItemById(be)}function Ye(){return y.getSelectedItems()}return n.expose({addNewDataItem:ce,addNewChildDataItem:pe,removeDataItem:we,editDataItem:He,acceptDataItem:le,cancelDataItem:he,updateColumns:Ne,updateDataSource:Fe,selectItemById:Ue,getSelectedItems:Ye}),()=>e.createVNode("div",{ref:a,class:de.value,style:C.value,onWheel:L},[ee(),e.createVNode("div",{ref:r,class:ne.value,onMouseover:()=>{c.value=!0},onMouseleave:()=>{c.value=!1}},[se(p),oe(),Te(),ke()]),K(),b.value&&ue()])}});function dC(t,n,o){return n}const uC=new Map([["appearance",ge]]),fC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-group.schema.json",title:"radio-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a radio-group",type:"string"},type:{description:"The type string of radio-group component",type:"string",default:"radio-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},pC={title:"radio-group",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},$r={id:String,disabled:{type:Boolean,default:!1},enumData:{type:Array,default:[{value:"example",name:"example1"}]},horizontal:{type:Boolean,default:!1},modelValue:{type:String,default:""},name:{type:String,default:""},tabIndex:Number,textField:{type:String,default:"name"},valueField:{type:String,default:"value"}},su=me($r,fC,uC,dC,pC);function lu(t,n,o){const a=e.computed(()=>!t.disabled),r=e.computed(()=>t.enumData||[]);function i(p){return p[t.valueField]}function s(p){return p[t.textField]}function l(p,c){if(a.value){const f=i(p);o.value!==f&&(o.value=f,n.emit("changeValue",f),n.emit("update:modelValue",f))}c.stopPropagation()}return{enumData:r,getValue:i,getText:s,onClickRadio:l}}const Ao=e.defineComponent({name:"FRadioGroup",props:$r,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),{enumData:a,onClickRadio:r,getValue:i,getText:s}=lu(t,n,o),l=e.computed(()=>({"farris-checkradio-hor":t.horizontal}));return()=>e.createVNode("div",{class:["farris-input-wrap",l.value]},[a.value.map((p,c)=>{const f="radio_"+t.name+c;return e.createVNode("div",{class:"custom-control custom-radio"},[e.createVNode("input",{type:"radio",class:"custom-control-input",name:t.name,id:f,value:i(p),checked:i(p)===o.value,disabled:t.disabled,tabindex:t.tabIndex,onClick:u=>r(p,u)},null),e.createVNode("label",{class:"custom-control-label",for:f},[s(p)])])})])}}),Er=e.defineComponent({name:"FFieldSelectorContainer",props:Ar,emits:["selected","bindingTypeChange"],setup(t,n){var m,g;const o=e.ref(t.data),a=e.ref(t.bindingType),r=e.ref(t.bindingData),i=e.ref(),s=e.computed(()=>a.value.data),l=e.computed(()=>{var h;return(h=r.value)==null?void 0:h.map(y=>y[t.idField])});e.watch(()=>t.data,h=>{o.value=h,i.value.updateDataSource(h)});const p={"f-utils-fill":!0,"p-2":(m=t.bindingType)==null?void 0:m.enable,"px-2":!((g=t.bindingType)!=null&&g.enable)};function c(h){n.emit("bindingTypeChange",h)}function f(h){r.value=h,n.emit("selected",h)}function u(){return e.createVNode("div",{class:"px-3"},[e.createVNode(Ao,{name:"bindingType",textField:a.value.textField,valueField:a.value.valueField,enumData:s.value,modelValue:a.value.value,"onUpdate:modelValue":h=>a.value.value=h,horizontal:!0,onChangeValue:c},null)])}function d(){return e.createVNode(On,{ref:i,fit:!0,data:o.value,idField:t.idField,columns:t.columns,rowNumber:{enable:!1},columnOption:{fitColumns:!0},"selection-values":l.value,onSelectionChange:f},null)}return()=>e.createVNode("div",{class:"h-100 d-flex flex-column"},[a.value.enable&&u(),e.createVNode("div",{class:p,style:"position:relative"},[d()])])}}),Br=e.defineComponent({name:"FFieldSelector",props:Ar,emits:["selected","bindingTypeChanged"],setup(t,n){const o='<i class="f-icon f-icon-lookup"></i>',a=e.ref(t.bindingData),r=e.ref(t.columns),i=e.ref(t.data);e.watch(()=>t.data,d=>{i.value=d});const s=e.ref("");function l(d){a.value=d}function p(d){n.emit("bindingTypeChanged",d)}function c(){var m;let d="";if(a.value){const g=a.value.map(h=>h[t.textField]).join(t.separator);(m=t.bindingType)!=null&&m.enable?d=`${t.bindingType.value}:${g}`:d=g}s.value=d}function f(){return e.createVNode(Er,{data:i.value,bindingType:t.bindingType,columns:r.value,onSelected:l,bindingData:a.value,onBindingTypeChange:p},null)}e.onMounted(()=>{c()});const u={title:t.title,fitContent:!1,height:t.modalHeight,width:t.modalWidth,acceptCallback:()=>{n.emit("selected",a.value),c()},rejectCallback:()=>{}};return()=>e.createVNode(dt,{modelValue:s.value,"onUpdate:modelValue":d=>s.value=d,editable:!1,disabled:t.disabled,readonly:t.readonly,inputType:"text",enableClear:!1,buttonContent:o,buttonBehavior:"Modal",modalOptions:u},{default:()=>[e.createVNode("div",{class:"h-100 d-flex flex-column"},[f()])]})}}),cu={install(t){t.component(Br.name,Br),t.component(Er.name,Er)},register(t,n,o){t["field-selector"]=Br,n["field-selector"]=eC}};function mC(t,n,o){return n}const hC=new Map([["appearance",ge]]),gC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/image-cropper.schema.json",title:"image-cropper",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for image-cropper",type:"string"},type:{description:"The type string of image-cropper",type:"string",default:"image-cropper"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},yC={title:"image-cropper",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"}}}}},Fr={format:{type:String,default:"png"},maintainAspectRatio:{type:Boolean,default:!0},transform:{type:Object,default:{scale:0,rotate:0,flipH:!1,flipV:!1}},aspectRatio:{type:Number,default:1},resizeToWidth:{type:Number,default:0},resizeToHeight:{type:Number,default:0},cropperMinWidth:{type:Number,default:0},cropperMinHeight:{type:Number,default:0},canvasRotation:{type:Number,default:0},roundCropper:{type:Boolean,default:!0},onlyScaleDown:{type:Boolean,default:!1},imageQuality:{type:Number,default:92},autoCrop:{type:Boolean,default:!0},backgroundColor:{type:String,default:""},containWithinAspectRatio:{type:Boolean,default:!1},hideResizeSquares:{type:Boolean,default:!1},loadImageErrorText:{type:String,default:"图片加载错误"},alignImage:{type:String,default:"center"},disabled:{type:Boolean,default:!1},imageURL:{type:String,default:"./src/assets/image01.png"},imageChangedEvent:{type:Object,default:null},imageBase64:{type:String,default:""},imageFile:{type:Object,default:null},cropper:{type:Object,default:{x1:-100,y1:-100,x2:1e4,y2:1e4}}},du=me(Fr,gC,hC,mC,yC);var $o=(t=>(t.Move="move",t.Resize="resize",t))($o||{});function bC(){function t(r){switch(typeof r=="string"&&(r=n(r)),r){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}function n(r){const i=new DataView(o(r));if(i.getUint16(0,!1)!==65496)return-2;const s=i.byteLength;let l=2;for(;l<s;){if(i.getUint16(l+2,!1)<=8)return-1;const p=i.getUint16(l,!1);if(l+=2,p===65505){if(i.getUint32(l+=2,!1)!==1165519206)return-1;const c=i.getUint16(l+=6,!1)===18761;l+=i.getUint32(l+4,c);const f=i.getUint16(l,c);l+=2;for(let u=0;u<f;u++)if(i.getUint16(l+u*12,c)===274)return i.getUint16(l+u*12+8,c)}else{if((p&65280)!==65280)break;l+=i.getUint16(l,!1)}}return-1}function o(r){r=r.replace(/^data:([^;]+);base64,/gmi,"");const i=atob(r),s=i.length,l=new Uint8Array(s);for(let p=0;p<s;p++)l[p]=i.charCodeAt(p);return l.buffer}function a(r,i,s){const l=r.width,p=r.height;i=Math.round(i),s=Math.round(s);const c=l/i,f=p/s,u=Math.ceil(c/2),d=Math.ceil(f/2),m=r.getContext("2d");if(m){const g=m.getImageData(0,0,l,p),h=m.createImageData(i,s),{data:y}=g,v=h.data;for(let b=0;b<s;b++)for(let x=0;x<i;x++){const C=(x+b*i)*4,w=b*f;let V=0,N=0,S=0,D=0,k=0,A=0,$=0;const T=Math.floor(x*c),E=Math.floor(b*f);let B=Math.ceil((x+1)*c),I=Math.ceil((b+1)*f);B=Math.min(B,l),I=Math.min(I,p);for(let F=E;F<I;F++){const R=Math.abs(w-F)/d,O=x*c,W=R*R;for(let M=T;M<B;M++){const _=Math.abs(O-M)/u,H=Math.sqrt(W+_*_);if(H>=1)continue;V=2*H*H*H-3*H*H+1;const L=4*(M+F*l);$+=V*y[L+3],S+=V,y[L+3]<255&&(V=V*y[L+3]/250),D+=V*y[L],k+=V*y[L+1],A+=V*y[L+2],N+=V}}v[C]=D/N,v[C+1]=k/N,v[C+2]=A/N,v[C+3]=$/S}r.width=i,r.height=s,m.putImageData(h,0,0)}}return{resizeCanvas:a,getTransformationsFromExifData:t}}function vC(t,n,o,a){function r(d,m){t.value.x2=t.value.x1+(t.value.y2-t.value.y1)*o.value,d=Math.max(t.value.x2-n.value.width,0),m=Math.max(0-t.value.y1,0),(d>0||m>0)&&(t.value.x2-=m*o.value>d?m*o.value:d,t.value.y1+=m*o.value>d?m:d/o.value)}function i(d,m){t.value.x2=t.value.x1+(t.value.y2-t.value.y1)*o.value,d=Math.max(t.value.x2-n.value.width,0),m=Math.max(t.value.y2-n.value.height,0),(d>0||m>0)&&(t.value.x2-=m*o.value>d?m*o.value:d,t.value.y2-=m*o.value>d?m:d/o.value)}function s(d,m){t.value.y1=t.value.y2-(t.value.x2-t.value.x1)/o.value,d=Math.max(0-t.value.x1,0),m=Math.max(0-t.value.y1,0),(d>0||m>0)&&(t.value.x1+=m*o.value>d?m*o.value:d,t.value.y1+=m*o.value>d?m:d/o.value)}function l(d,m){t.value.y1=t.value.y2-(t.value.x2-t.value.x1)/o.value,d=Math.max(t.value.x2-n.value.width,0),m=Math.max(0-t.value.y1,0),(d>0||m>0)&&(t.value.x2-=m*o.value>d?m*o.value:d,t.value.y1+=m*o.value>d?m:d/o.value)}function p(d,m){t.value.y2=t.value.y1+(t.value.x2-t.value.x1)/o.value,d=Math.max(t.value.x2-n.value.width,0),m=Math.max(t.value.y2-n.value.height,0),(d>0||m>0)&&(t.value.x2-=m*o.value>d?m*o.value:d,t.value.y2-=m*o.value>d?m:d/o.value)}function c(d,m){t.value.y2=t.value.y1+(t.value.x2-t.value.x1)/o.value,d=Math.max(0-t.value.x1,0),m=Math.max(t.value.y2-n.value.height,0),(d>0||m>0)&&(t.value.x1+=m*o.value>d?m*o.value:d,t.value.y2-=m*o.value>d?m:d/o.value)}function f(){t.value.x2=t.value.x1+(t.value.y2-t.value.y1)*o.value,t.value.y2=t.value.y1+(t.value.x2-t.value.x1)/o.value;const d=Math.max(0-t.value.x1,0),m=Math.max(t.value.x2-n.value.width,0),g=Math.max(t.value.y2-n.value.height,0),h=Math.max(0-t.value.y1,0);(d>0||m>0||g>0||h>0)&&(t.value.x1+=g*o.value>d?g*o.value:d,t.value.x2-=h*o.value>m?h*o.value:m,t.value.y1+=h*o.value>m?h:m/o.value,t.value.y2-=g*o.value>d?g:d/o.value)}function u(){if(n.value.width&&n.value.height)switch(a.position){case"top":r(0,0);break;case"bottom":i(0,0);break;case"topleft":s(0,0);break;case"topright":l(0,0);break;case"right":case"bottomright":p(0,0);break;case"left":case"bottomleft":c(0,0);break;case"center":f();break}}return{checkAspectRatio:u}}function uu(t,n){const{resizeCanvas:o,getTransformationsFromExifData:a}=bC(),r=e.inject("NotifyService"),i=e.ref(t.cropper),s=e.ref(t.transform),l=e.ref(t.cropperMinWidth),p=e.ref(t.maintainAspectRatio),c=e.ref(t.aspectRatio),f=e.ref(t.autoCrop),u=e.ref(t.backgroundColor),d=e.ref(t.resizeToWidth),m=e.ref(t.onlyScaleDown),g=e.ref(t.containWithinAspectRatio),h=e.ref(t.canvasRotation),y=e.ref(t.format),v=e.ref(t.imageQuality),b=e.ref(t.resizeToHeight),x=e.ref(t.cropperMinHeight),C=e.ref(""),w=e.ref(!0),V=e.ref(!0);let N,S,D=0,k,A,$;const T=e.ref(null),E=e.ref(""),B=e.ref(""),I=e.ref("0px"),F=e.ref(),R=e.ref({width:100,height:100}),O=$o;let W,M=20,_=20,H=!1,L={rotate:0,flip:!1},G={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0};const Y=e.ref(t.imageChangedEvent),z=e.ref(t.imageURL),q=e.ref(t.imageBase64),j=e.ref(t.imageFile);function Z(){B.value="scaleX("+(s.value.scale||1)*(s.value.flipH?-1:1)+")scaleY("+(s.value.scale||1)*(s.value.flipV?-1:1)+")rotate("+(s.value.rotate||0)+"deg)"}function U(){V.value=!1,F.value=null,C.value="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",G={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},R.value={width:0,height:0},N={width:0,height:0},S={width:0,height:0},i.value.x1=-100,i.value.y1=-100,i.value.x2=1e4,i.value.y2=1e4}function X(re){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(re)}function ie(){if(h.value+=L.rotate,g.value&&N.width&&N.height){if(h.value%2){const Ce=N.width*c.value,Re=N.height/c.value;return{width:Math.max(N.height,Ce),height:Math.max(N.width,Re)}}const re=N.height*c.value,fe=N.width/c.value;return{width:Math.max(N.width,re),height:Math.max(N.height,fe)}}return h.value%2?{height:N.width,width:N.height}:{width:N.width,height:N.height}}function de(){h.value+=L.rotate;const re=ie(),fe=document.createElement("canvas");re.width&&re.height&&(fe.width=re.width,fe.height=re.height);const Ce=fe.getContext("2d");return N.width&&N.height&&$&&(Ce==null||Ce.setTransform(L.flip?-1:1,0,0,1,fe.width/2,fe.height/2),Ce==null||Ce.rotate(Math.PI*(h.value/2)),Ce==null||Ce.drawImage($,-N.width/2,-N.height/2)),fe.toDataURL()}function ne(re){return new Promise(fe=>{W=re,C.value=re,F.value=new Image,F.value.onload=()=>{var Ce,Re;S.width=(Ce=F.value)==null?void 0:Ce.naturalWidth,S.height=(Re=F.value)==null?void 0:Re.naturalHeight,fe()},F.value.src=W})}function oe(){if(!$||!$.complete||!L)return Promise.reject(new Error("No image loaded"));const re=de();return ne(re)}function ee(re){const fe=Ce=>{r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片上传错误,请重试"}]}),w.value=!1,H=!0,n.emit("loadImageFailed"),$=null,E.value=""};$=new Image,$.onload=()=>{E.value=re,L=a(re),N.width=$==null?void 0:$.naturalWidth,N.height=$==null?void 0:$.naturalHeight,oe().then(()=>{H=!1}).catch(fe)},$.onerror=fe,$.src=re}function K(re,fe){X(fe)?(H=!1,ee(re)):(r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片类型不正确,请重试"}]}),w.value=!1,H=!0,n.emit("loadImageFailed"))}function se(re){const fe=new FileReader;fe.onload=Ce=>K(Ce.target.result,re.type),fe.readAsDataURL(re)}function ue(re){const fe=new Image;fe.onerror=()=>{r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片加载错误,请重试"}]}),w.value=!1,H=!0,n.emit("loadImageFailed")},fe.onload=()=>{H=!1;const Ce=document.createElement("canvas"),Re=Ce.getContext("2d");Ce.width=fe.width,Ce.height=fe.height,Re==null||Re.drawImage(fe,0,0),ee(Ce.toDataURL())},fe.crossOrigin="anonymous",fe.src=re}function Te(){return T.value&&T.value&&T.value.offsetWidth>0}function ke(){if(T.value){const re=T.value;R.value.width=re.offsetWidth,R.value.height=re.offsetHeight,I.value="calc(50% - "+R.value.width/2+"px)"}}function _e(){F.value&&R.value.width&&(M=l.value>0?Math.max(20,l.value/F.value.width*R.value.width):20)}function te(){p.value?_=Math.max(20,M/c.value):x.value>0&&F.value&&R.value.height?_=Math.max(20,x.value/F.value.height*R.value.height):_=20}function ce(){F.value?(_e(),te()):(M=20,_=20)}function pe(){const re=T.value,fe=e.ref({x1:0,x2:0,y1:0,y2:0});if(re&&S.width&&S.height){const Ce=S.width/re.offsetWidth;fe.value={x1:Math.round(i.value.x1*Ce),y1:Math.round(i.value.y1*Ce),x2:Math.round(i.value.x2*Ce),y2:Math.round(i.value.y2*Ce)},g.value||(fe.value.x1=Math.max(fe.value.x1,0),fe.value.y1=Math.max(fe.value.y1,0),fe.value.x2=Math.min(fe.value.x2,S.width),fe.value.y2=Math.min(fe.value.y2,S.height))}return fe.value}function we(){h.value+=L.rotate;const re=T.value,fe=e.ref({x1:0,x2:0,y1:0,y2:0});if(re&&S.height&&S.width&&N.height&&N.width){const Ce=S.width/re.offsetWidth;let Re,Oe;h.value%2?(Re=(S.width-N.height)/2,Oe=(S.height-N.width)/2):(Re=(S.width-N.width)/2,Oe=(S.height-N.height)/2),fe.value={x1:Math.round(i.value.x1*Ce)-Re,y1:Math.round(i.value.y1*Ce)-Oe,x2:Math.round(i.value.x2*Ce)-Re,y2:Math.round(i.value.y2*Ce)-Oe},g.value||(fe.value.x1=Math.max(fe.value.x1,0),fe.value.y1=Math.max(fe.value.y1,0),fe.value.x2=Math.min(fe.value.x2,S.width),fe.value.y2=Math.min(fe.value.y2,S.height))}return fe.value}function He(re,fe){if(d.value>0){if(!m.value||re>d.value)return d.value/re}else if(b.value>0&&(!m.value||fe>b.value))return b.value/fe;return 1}function le(){return Math.min(1,Math.max(0,v.value/100))}function he(re){return re.toDataURL("image/"+y.value,le())}function Ne(){if(T.value&&T.value&&F.value!=null){const re=pe(),fe=re.x2-re.x1,Ce=re.y2-re.y1,Re=document.createElement("canvas");Re.width=fe,Re.height=Ce;const Oe=Re.getContext("2d");if(Oe){u.value!=null&&(Oe.fillStyle=u.value,Oe.fillRect(0,0,fe,Ce));const st=(s.value.scale||1)*(s.value.flipH?-1:1),Ct=(s.value.scale||1)*(s.value.flipV?-1:1);S.width&&S.height&&(Oe.setTransform(st,0,0,Ct,S.width/2,S.height/2),Oe.translate(-re.x1/st,-re.y1/Ct),Oe.rotate((s.value.rotate||0)*Math.PI/180),Oe.drawImage(F.value,-S.width/2,-S.height/2));const ht={width:fe,height:Ce,imagePosition:re,cropperPosition:{...i.value}};g.value&&(ht.offsetImagePosition=we());const Cn=He(fe,Ce);return Cn!==1&&(ht.width=Math.round(fe*Cn),ht.height=p.value?Math.round(ht.width/c.value):Math.round(Ce*Cn),o(Re,ht.width,ht.height)),ht.base64=he(Re),n.emit("imageCropped",ht),ht}}return null}function Fe(){f.value&&Ne()}function Ue(){const re=T.value;if(re){if(!p.value)i.value.x1=0,i.value.x2=re.offsetWidth,i.value.y1=0,i.value.y2=re.offsetHeight;else if(re.offsetWidth/c.value<re.offsetHeight){i.value.x1=0,i.value.x2=re.offsetWidth;const fe=re.offsetWidth/c.value;i.value.y1=(re.offsetHeight-fe)/2,i.value.y2=i.value.y1+fe}else{i.value.y1=0,i.value.y2=re.offsetHeight;const fe=re.offsetHeight*c.value;i.value.x1=(re.offsetWidth-fe)/2,i.value.x2=i.value.x1+fe}Fe(),V.value=!0}}function Ye(){D>40?(r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片加载超时,请重试"}]}),H=!0,w.value=!1,n.emit("loadImageFailed")):Te()?(H=!1,ke(),ce(),Ue(),n.emit("cropperReady",{...R.value})):(D++,setTimeout(()=>Ye(),50))}function We(){F.value!=null&&(w.value=!1,n.emit("imageLoaded"),D=0,setTimeout(()=>Ye()))}function be(){const re=T.value;(R.value.width!==(re==null?void 0:re.offsetWidth)||R.value.height!==(re==null?void 0:re.offsetHeight))&&R.value.width&&R.value.height&&re&&(i.value.x1=i.value.x1*re.offsetWidth/R.value.width,i.value.x2=i.value.x2*re.offsetWidth/R.value.width,i.value.y1=i.value.y1*re.offsetHeight/R.value.height,i.value.y2=i.value.y2*re.offsetHeight/R.value.height)}const ze=()=>{be(),ke(),ce()},it=()=>{clearTimeout(A),A=setTimeout(ze,300)};e.onMounted(()=>{window.addEventListener("resize",it),z.value&&(U(),w.value=!0,ue(z.value))}),e.onUnmounted(()=>{window.removeEventListener("resize",it)});function bt(){G.active&&(G.active=!1,Fe())}function pt(re){return(re.touches&&re.touches[0]?re.touches[0].clientX:re.clientX)||0}function mt(re){return(re.touches&&re.touches[0]?re.touches[0].clientY:re.clientY)||0}function Dt(re,fe,Ce=null){G&&G.active||(re.preventDefault&&re.preventDefault(),G={active:!0,type:fe,position:Ce,clientX:pt(re),clientY:mt(re),...i.value})}function xt(re=!1){i.value.x1<0&&(i.value.x2-=re?i.value.x1:0,i.value.x1=0),i.value.y1<0&&(i.value.y2-=re?i.value.y1:0,i.value.y1=0),i.value.x2>R.value.width&&(i.value.x1-=re?i.value.x2-R.value.width:0,i.value.x2=R.value.width),i.value.y2>R.value.height&&(i.value.y1-=re?i.value.y2-R.value.height:0,i.value.y2=R.value.height)}function je(re){const fe=pt(re)-G.clientX,Ce=mt(re)-G.clientY;i.value.x1=G.x1+fe,i.value.y1=G.y1+Ce,i.value.x2=G.x2+fe,i.value.y2=G.y2+Ce}const{checkAspectRatio:kt}=vC(i,R,c,G);function Et(re){const fe=pt(re)-G.clientX,Ce=mt(re)-G.clientY;switch(G.position){case"left":i.value.x1=Math.min(G.x1+fe,i.value.x2-M);break;case"topleft":i.value.x1=Math.min(G.x1+fe,i.value.x2-M),i.value.y1=Math.min(G.y1+Ce,i.value.y2-_);break;case"top":i.value.y1=Math.min(G.y1+Ce,i.value.y2-_);break;case"topright":i.value.x2=Math.max(G.x2+fe,i.value.x1+M),i.value.y1=Math.min(G.y1+Ce,i.value.y2-_);break;case"right":i.value.x2=Math.max(G.x2+fe,i.value.x1+M);break;case"bottomright":i.value.x2=Math.max(G.x2+fe,i.value.x1+M),i.value.y2=Math.max(G.y2+Ce,i.value.y1+_);break;case"bottom":i.value.y2=Math.max(G.y2+Ce,i.value.y1+_);break;case"bottomleft":i.value.x1=Math.min(G.x1+fe,i.value.x2-M),i.value.y2=Math.max(G.y2+Ce,i.value.y1+_);break;case"center":const{scale:Re}=re,Oe=Math.abs(G.x2-G.x1)*Re,st=Math.abs(G.y2-G.y1)*Re,{x1:Ct}=i.value,{y1:ht}=i.value;i.value.x1=Math.min(G.clientX-Oe/2,i.value.x2-M),i.value.y1=Math.min(G.clientY-st/2,i.value.y2-_),i.value.x2=Math.max(G.clientX+Oe/2,Ct+M),i.value.y2=Math.max(G.clientY+st/2,ht+_);break}p.value&&kt()}function Ge(re){G&&G.active&&(re.stopPropagation&&re.stopPropagation(),re.preventDefault&&re.preventDefault(),clearTimeout(k),k=setTimeout(()=>{G.type===$o.Move?(je(re),xt(!0)):G.type===$o.Resize&&(Et(re),xt(!1))},300))}return e.watch(Y,re=>{U(),re&&re.target&&re.target.files&&re.target.files.length>0&&(w.value=!0,se(re.target.files[0]))}),e.watch(z,re=>{re?(U(),w.value=!0,ue(re)):(r.show({showCloseButton:!1,timeout:3e3,animate:"fadeIn",toasts:[{type:"string",title:"提示",msg:"图片路径为空"}]}),w.value=!1,H=!0)}),e.watch(q,re=>{U(),w.value=!0,ee(re)}),e.watch(j,re=>{U(),re&&(w.value=!0,se(re))}),e.watch(()=>[t.containWithinAspectRatio,t.canvasRotation,t.cropper,t.aspectRatio,t.transform,t.imageChangedEvent],([re,fe,Ce,Re,Oe,st],[Ct,ht,Cn,Mm,ta,Ks])=>{$&&$.complete&&L&&(re!==Ct||fe!==ht)&&oe(),Ce!==Cn&&(ke(),ce(),xt(!1),Fe()),Re!==Mm&&V.value&&Ue(),Oe!==ta&&(Z(),Fe()),st!==Ks&&(Y.value=st)}),{uploadError:H,imageVisible:V,backgroundColor:u,sourceImage:T,safeImgDataUrl:C,safeTransformStyle:B,maxSize:R,cropper:i,marginLeft:I,moveTypes:O,isLoading:w,startMove:Dt,imageLoadedInView:We,moveStop:bt,moveImg:Ge}}const Ir=e.defineComponent({name:"FImageCropper",props:Fr,emits:["imageCropped","imageLoaded","cropperReady","loadImageFailed"],setup(t,n){const o=e.ref(t.alignImage),a=e.ref(t.roundCropper),r=e.ref(t.hideResizeSquares),i=e.ref(t.loadImageErrorText),s=e.ref(t.disabled),l=e.ref(null),{uploadError:p,imageVisible:c,backgroundColor:f,sourceImage:u,safeImgDataUrl:d,safeTransformStyle:m,maxSize:g,cropper:h,marginLeft:y,moveTypes:v,isLoading:b,startMove:x,imageLoadedInView:C,moveStop:w,moveImg:V}=uu(t,n);function N(A){return e.createVNode("span",{class:`farris-image-cropper-resize-bar ${A}`,onMousedown:e.withModifiers($=>x($,v.Resize,A),["prevent"])},null)}function S(A){return e.createVNode("div",null,[e.createVNode("span",{class:`farris-image-cropper-resize-bar ${A}`,onMousedown:e.withModifiers($=>x($,v.Resize,A),["prevent"])},[e.createVNode("span",{class:"farris-image-cropper-square"},null)]),e.createVNode("span",{class:"farris-image-cropper-resize top"},[e.createVNode("span",{class:"farris-image-cropper-square"},null)])])}const D=["top","right","bottom","left"].map(A=>N(A)),k=["topleft","topright","bottomright","bottomleft"].map(A=>S(A));return()=>e.createVNode("div",{class:["farris-image-cropper-frame",{"farris-image-cropper-disabled":s.value}],style:{"text-align":o.value},onMousemove:e.withModifiers(A=>V(A),["prevent"]),onTouchmove:e.withModifiers(A=>V(A),["prevent"]),onMouseup:e.withModifiers(()=>w(),["prevent"]),onTouchend:e.withModifiers(()=>w(),["prevent"])},[!p&&e.createVNode("div",{ref:l,class:"farris-image-cropper",style:[{background:c.value?f.value:""}]},[d.value&&e.createVNode("img",{title:"farris-source-image",ref:u,class:"farris-source-image",style:[{visibility:c.value?"visible":"hidden"},{transform:m.value}],src:d.value,onLoad:()=>C()},null),g.value&&e.createVNode("div",{class:"farris-image-overlay",style:[{width:`${g.value.width||0}px`},{height:`${g.value.height||0}px`},{"margin-left":o.value==="center"?y.value:""}]},null),c.value&&e.createVNode("div",{class:["farris-image-cropper-wrapper",{"farris-image-cropper-rounded":a.value}],style:[{top:`${h.value.y1}px`},{left:`${h.value.x1}px`},{width:`${h.value.x2-h.value.x1}px`},{height:`${h.value.y2-h.value.y1}px`},{visibility:c.value?"visible":"hidden"},{"margin-left":o.value==="center"?y.value:""}],tabindex:"0"},[e.createVNode("div",{class:"farris-image-cropper-move",onMousedown:e.withModifiers(A=>x(A,v.Move,"topleft"),["prevent"])},null),!r.value&&e.createVNode("div",null,[k,D])])]),b.value&&e.createVNode("div",{class:"farris-image-cropper-loading"},[e.createVNode("div",{class:"farris-image-cropper-loading-spinner"},null)]),p&&e.createVNode("div",{class:"farris-image-cropper-error"},[i.value])])}}),xC=e.defineComponent({name:"FImageCropperDesign",props:Fr,emits:["imageCropped","imageLoaded","cropperReady","loadImageFailed"],setup(t,n){const o=e.ref(t.alignImage),a=e.ref(t.roundCropper),r=e.ref(t.hideResizeSquares),i=e.ref(t.loadImageErrorText),s=e.ref(t.disabled),l=e.ref(null),{uploadError:p,imageVisible:c,backgroundColor:f,sourceImage:u,safeImgDataUrl:d,safeTransformStyle:m,maxSize:g,cropper:h,marginLeft:y,moveTypes:v,isLoading:b,startMove:x,imageLoadedInView:C,moveStop:w,moveImg:V}=uu(t,n),N=e.ref(),S=e.inject("design-item-context"),D=ye(N,S);e.onMounted(()=>{N.value.componentInstance=D}),n.expose(D.value);function k(E){return e.createVNode("span",{class:`farris-image-cropper-resize-bar ${E}`,onMousedown:e.withModifiers(B=>x(B,v.Resize,E),["prevent"])},null)}function A(E){return e.createVNode("div",null,[e.createVNode("span",{class:`farris-image-cropper-resize-bar ${E}`,onMousedown:e.withModifiers(B=>x(B,v.Resize,E),["prevent"])},[e.createVNode("span",{class:"farris-image-cropper-square"},null)]),e.createVNode("span",{class:"farris-image-cropper-resize top"},[e.createVNode("span",{class:"farris-image-cropper-square"},null)])])}const $=["top","right","bottom","left"].map(E=>k(E)),T=["topleft","topright","bottomright","bottomleft"].map(E=>A(E));return()=>e.createVNode("div",{ref:N,class:["farris-image-cropper-frame",{"farris-image-cropper-disabled":s.value}],style:{"text-align":o.value},onMousemove:e.withModifiers(E=>V(E),["prevent"]),onTouchmove:e.withModifiers(E=>V(E),["prevent"]),onMouseup:e.withModifiers(()=>w(),["prevent"]),onTouchend:e.withModifiers(()=>w(),["prevent"])},[!p&&e.createVNode("div",{ref:l,class:"farris-image-cropper",style:[{background:c.value?f.value:""}]},[d.value&&e.createVNode("img",{title:"farris-source-image",ref:u,class:"farris-source-image",style:[{visibility:c.value?"visible":"hidden"},{transform:m.value}],src:d.value,onLoad:()=>C()},null),g.value&&e.createVNode("div",{class:"farris-image-overlay",style:[{width:`${g.value.width||0}px`},{height:`${g.value.height||0}px`},{"margin-left":o.value==="center"?y.value:""}]},null),c.value&&e.createVNode("div",{class:["farris-image-cropper-wrapper",{"farris-image-cropper-rounded":a.value}],style:[{top:`${h.value.y1}px`},{left:`${h.value.x1}px`},{width:`${h.value.x2-h.value.x1}px`},{height:`${h.value.y2-h.value.y1}px`},{visibility:c.value?"visible":"hidden"},{"margin-left":o.value==="center"?y.value:""}],tabindex:"0"},[e.createVNode("div",{class:"farris-image-cropper-move",onMousedown:e.withModifiers(E=>x(E,v.Move,"topleft"),["prevent"])},null),!r.value&&e.createVNode("div",null,[T,$])])]),b.value&&e.createVNode("div",{class:"farris-image-cropper-loading"},[e.createVNode("div",{class:"farris-image-cropper-loading-spinner"},null)]),p&&e.createVNode("div",{class:"farris-image-cropper-error"},[i.value])])}}),fu={install(t){t.component(Ir.name,Ir)},register(t,n,o){t["image-cropper"]=Ir,n["image-cropper"]=du},registerDesigner(t,n,o){t["image-cropper"]=xC,n["image-cropper"]=du}},CC=e.defineComponent({name:"FInputGroupDesign",props:Ta,emits:["updateExtendInfo","clear","valueChange","clickHandle","blurHandle","focusHandle","enterHandle","iconMouseEnter","iconMouseLeave","keyupHandle","keydownHandle","inputClick"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.modelValue),r=Ql(t,n,o,a),{inputGroupClass:i,inputType:s,inputGroupStyle:l}=r,p=Zl(t),{shouldShowAppendedButton:c}=p,f=Xl(t,n,r),{onMouseEnter:u,onMouseLeave:d}=f,m=Kl(t,n,s,p),g=xc(t,n,m,r),h=Cc(t,n,p,f,m);return()=>e.createVNode("div",{id:"inputGroup",class:i.value,style:l.value,onMouseenter:u,onMouseleave:d},[g(),c.value&&h()])}}),pu={install(t){t.component(Mt.name,Mt)},register(t,n,o){t["input-group"]=Mt,n["input-group"]=Yl},registerDesigner(t,n,o){t["input-group"]=CC,n["input-group"]=Yl}},mu=new Map([["appearance",ge]]);function hu(t,n,o){return n}const wC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/layout.schema.json",title:"layout",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for layout component",type:"string"},type:{description:"The type string of layout component",type:"string",default:"layout"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},collapsable:{description:"",type:"boolean",default:!1},resizable:{description:"",type:"boolean",default:!0},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},VC={title:"layout",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}},behavior:{description:"Basic Infomation",title:"行为",properties:{collapsable:{description:"",title:"可收折",type:"boolean"},resizable:{description:"",title:"可调整尺寸",type:"boolean"}}}}},Mr={customClass:{type:String,defaut:""}},gu=me(Mr,wC,mu,hu,VC);function yu(t){const n=e.ref(-1),o=e.ref(-1),a=e.ref(0),r=e.ref(0),i=e.ref(!1),s=e.ref(!1),l=e.computed(()=>({display:i.value?"block":"none",left:`${a.value}px`,cursor:"e-resize"})),p=e.computed(()=>({display:s.value?"block":"none",top:`${r.value}px`,cursor:"n-resize"})),c=e.computed(()=>({display:s.value||i.value?"block":"none"}));function f(y,v,b,x){const C=t.value;if(C){const{left:w,right:V,width:N}=C.getBoundingClientRect();let S=y.clientX-w;x==="right"&&(S=V-y.clientX),S>v&&(S=v),S<b&&(S=b),x==="right"&&(S=N-S),a.value=S}}function u(y,v,b,x){const C=t.value;if(C){const{top:w,bottom:V,height:N}=C.getBoundingClientRect();let S=y.clientY-w;x==="bottom"&&(S=V-y.clientY),S>v&&(S=v),S<b&&(S=b),x==="bottom"&&(S=N-S),r.value=S}}function d(){const y=t.value;if(y){const{width:v,height:b}=y.getBoundingClientRect();return{width:v,height:b}}return null}function m(){const y=t.value;return y?Array.from(y.querySelectorAll("[data-position]")).reduce((v,b)=>{const x=b.getAttribute("data-position");return v=Object.assign(v,{[x]:b}),v},{}):null}function g(y,v){const b=d(),x=m();if(b&&x){const C=x==null?void 0:x.right,w=x==null?void 0:x.left;if(y==="left"&&w)return C?b.width-C.clientWidth-v:b.width-v;if(y==="right"&&C)return w?b.width-w.clientWidth-v:b.width-v}}function h(y,v){const b=d(),x=m();if(b&&x){const C=x==null?void 0:x.bottom,w=x==null?void 0:x.top;if(y==="top"&&w)return C?b.height-C.clientHeight-v:b.height-v;if(y==="bottom"&&C)return w?b.height-w.clientHeight-v:b.height-v}}return{horizontalResizeHandleStyle:l,verticalResizeHandleStyle:p,resizeOverlayStyle:c,showHorizontalResizeHandle:i,showVerticalResizeHandle:s,horizontalResizeBarPosition:n,verticalResizeBarPosition:o,verticalResizeHandleOffset:r,horizontalResizeHandleOffset:a,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:u,getPanelMaxHeight:h,getPanelMaxWidth:g}}const Or=e.defineComponent({name:"FLayout",props:Mr,emits:[],setup(t,n){const o=e.ref(),a=yu(o),{horizontalResizeHandleStyle:r,verticalResizeHandleStyle:i,resizeOverlayStyle:s}=a;return e.provide("layout",{useResizeHandleComposition:a}),()=>e.createVNode("div",{class:"f-layout",ref:o},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-layout-resize-overlay",style:s.value},null),e.createVNode("div",{class:"f-layout-horizontal-resize-proxy",style:r.value},null),e.createVNode("div",{class:"f-layout-vertical-resize-proxy",style:i.value},null)])}}),NC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/layout-pane.schema.json",title:"layout-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a layout pane",type:"string"},type:{description:"The type string of layout paney",type:"string",default:"layout-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},height:{description:"",type:"number"},position:{description:"",type:"string",default:"left",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},width:{description:"",type:"number"},visible:{description:"",type:"number",default:!0}}},SC={title:"layout-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"enum"},width:{description:"",type:"number",title:"宽度"},height:{description:"",type:"number",title:"高度"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{collapsable:{description:"",type:"boolean",title:"允许收折"},position:{description:"",type:"enum",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}},resizeable:{description:"",type:"boolean",title:"允许调整尺寸"},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},Pr={customClass:{type:String,defaut:""},width:{type:Number,default:-1},height:{type:Number,default:-1},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100}},bu=me(Pr,NC,mu,hu,SC);function vu(t,n,o,a,r){const{horizontalResizeBarPosition:i,horizontalResizeHandleOffset:s,showHorizontalResizeHandle:l,showVerticalResizeHandle:p,verticalResizeBarPosition:c,verticalResizeHandleOffset:f,draggingHorizontalResizeHandle:u,draggingVerticalResizeHandle:d,getPanelMaxHeight:m,getPanelMaxWidth:g}=r;let h="",y,v,b;function x(V){if((h==="left"||h==="right")&&v){const{left:N}=v.getBoundingClientRect(),{width:S}=y.getBoundingClientRect(),D=V.clientX-N;let k=h==="left"?(S||0)+(D-i.value):(S||0)-(D-i.value);k=o.value>0?Math.max(o.value,k):k;const A=g(h,o.value);A!=null&&(k=A>k?k:A),t.value=k}if((h==="top"||h==="bottom")&&v){const{top:N}=v.getBoundingClientRect(),{height:S}=y.getBoundingClientRect(),D=V.clientY-N;let k=h==="top"?(S||0)+(D-c.value):(S||0)-(D-c.value);k=a.value>0?Math.max(a.value,k):k;const A=m(h,a.value);A!=null&&(k=A>k?k:A),n.value=k}s.value=0,f.value=0,i.value=-1,c.value=-1,l.value=!1,p.value=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",x),document.body.style.userSelect="",h="",y=null,v=null}function C(V,N,S){if(h=N,y=S,l.value=!0,v=V.composedPath().find(k=>(k.className||"").split(" ")[0]==="f-layout"),v){const{left:k}=v.getBoundingClientRect(),A=V.clientX-k;s.value=A,i.value=A;const $=g(h,o.value)||0;b=T=>u(T,$,o.value,h),document.addEventListener("mousemove",b),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}function w(V,N,S){if(h=N,y=S,p.value=!0,v=V.composedPath().find(k=>(k.className||"").split(" ")[0]==="f-layout"),v){const{top:k}=v.getBoundingClientRect();f.value=V.clientY-k,c.value=V.clientY-k;const A=m(h,a.value)||0;b=$=>d($,A,a.value,h),document.addEventListener("mousemove",b),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}}return{onClickHorizontalResizeBar:C,onClickVerticalResizeBar:w}}const _r=e.defineComponent({name:"FLayoutPane",props:Pr,emits:[],setup(t,n){const o=e.ref(t.minHeight<=0?100:t.minHeight),a=e.ref(t.minWidth<=0?100:t.minWidth),r=e.ref(t.width<=0?100:t.width),i=e.ref(t.height<=100?100:t.height),s=e.ref(Math.max(o.value,i.value)),l=e.ref(Math.max(a.value,r.value)),p=e.ref(),c=e.ref(t.position),f=e.ref(t.resizable);e.watch(()=>t.resizable,w=>{f.value=w});const u=e.inject("layout"),{useResizeHandleComposition:d}=u,m=vu(l,s,a,o,d),{onClickHorizontalResizeBar:g,onClickVerticalResizeBar:h}=m,y=e.computed(()=>({"f-layout-resize-bar":!0,"f-layout-resize-bar-e":c.value==="left","f-layout-resize-bar-n":c.value==="bottom","f-layout-resize-bar-s":c.value==="top","f-layout-resize-bar-w":c.value==="right"})),v=e.computed(()=>c.value!=="center"&&f.value);function b(w,V){(V==="left"||V==="right")&&g(w,V,p.value),(V==="top"||V==="bottom")&&h(w,V,p.value)}const x=e.computed(()=>{const w={"f-layout-pane":!0,"f-page-content-nav":c.value==="left"||c.value==="right","f-page-content-main":c.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((V,N)=>(V[N]=!0,V),w),w}),C=e.computed(()=>{const w={};return(l.value&&c.value==="left"||c.value==="right")&&(w.width=`${l.value}px`),(s.value&&c.value==="bottom"||c.value==="top")&&(w.height=`${s.value}px`),t.visible||(w.display="none"),w});return()=>e.createVNode("div",{ref:p,class:x.value,style:C.value,"data-position":c.value},[n.slots.default&&n.slots.default(),v.value&&e.createVNode("span",{class:y.value,onMousedown:w=>b(w,c.value)},null)])}});function TC(t,n){function o(){return!1}return{canAccepts:o}}const DC=e.defineComponent({name:"FLayoutDesign",props:Mr,emits:[],setup(t,n){var f;const o=e.ref(),a=e.inject("design-item-context"),r=TC(a.schema,(f=a.parent)==null?void 0:f.schema),i=ye(o,a,r);i.value.canNested=!1;const s=yu(o),{horizontalResizeHandleStyle:l,verticalResizeHandleStyle:p,resizeOverlayStyle:c}=s;return e.provide("layout",{useResizeHandleComposition:s}),e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{class:"f-layout f-page-content",ref:o},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-layout-resize-overlay",style:c.value},null),e.createVNode("div",{class:"f-layout-horizontal-resize-proxy",style:l.value},null),e.createVNode("div",{class:"f-layout-vertical-resize-proxy",style:p.value},null)])}});function kC(t,n){function o(i){return!!Rt().basalDragulaRuleForContainer(i)}function a(i,s,l){return l}function r(){const i=["f-layout-pane"];return(t.position==="left"||t.position==="right")&&i.push("f-page-content-nav"),t.position==="center"&&i.push("f-page-content-main"),i.join(" ")}return{canAccepts:o,getDesignerClass:r,onAcceptNewChildElement:a}}const AC=e.defineComponent({name:"FLayoutPaneDesign",props:Pr,emits:[],setup(t,n){var w;const o=e.ref(),a=e.ref(),r=e.inject("design-item-context"),i=kC(r.schema,(w=r.parent)==null?void 0:w.schema),s=ye(a,r,i);s.value.canNested=!1,s.value.canMove=!1,s.value.canDelete=!1,e.onMounted(()=>{a.value.componentInstance=s}),n.expose(s.value);const l=e.ref(Math.max(t.minHeight,t.height)),p=e.ref(Math.max(t.minWidth,t.width)),c=e.ref(t.minHeight),f=e.ref(t.minWidth),u=e.ref(t.position),d=e.inject("layout"),{useResizeHandleComposition:m}=d,g=vu(p,l,f,c,m),{onClickHorizontalResizeBar:h,onClickVerticalResizeBar:y}=g,v=e.computed(()=>({"f-layout-resize-bar":!0,"f-layout-resize-bar-e":u.value==="left","f-layout-resize-bar-n":u.value==="bottom","f-layout-resize-bar-s":u.value==="top","f-layout-resize-bar-w":u.value==="right"}));function b(V,N){(N==="left"||N==="right")&&h(V,N,o.value),(N==="top"||N==="bottom")&&y(V,N,o.value)}const x=e.computed(()=>{const V={"f-layout-pane":!0,"f-page-content-nav":u.value==="left"||u.value==="right","f-page-content-main":u.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((N,S)=>(N[S]=!0,N),V),V}),C=e.computed(()=>{const V={flex:"1"};return(p.value&&u.value==="left"||u.value==="right")&&(V.width=`${p.value}px`),(l.value&&u.value==="bottom"||u.value==="top")&&(V.height=`${l.value}px`),V});return()=>e.createVNode("div",{ref:o,class:x.value,style:C.value},[e.createVNode("div",{ref:a,class:"drag-container","data-dragref":`${r.schema.id}-container`},[n.slots.default&&n.slots.default()]),e.createVNode("span",{class:v.value,onMousedown:V=>b(V,u.value)},null)])}}),xu={install(t){t.component(Or.name,Or),t.component(_r.name,_r)},register(t,n,o){t.layout=Or,n.layout=gu,t["layout-pane"]=_r,n["layout-pane"]=bu},registerDesigner(t,n,o){t.layout=DC,n.layout=gu,t["layout-pane"]=AC,n["layout-pane"]=bu}},$C=new Map([["appearance",ge]]);function EC(t,n,o){return n}const BC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/list-nav.schema.json",title:"list-nav",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a list-nav",type:"string"},type:{description:"The type string of list-nav component",type:"string",default:"list-nav"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},FC={title:"list-nav",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}}}},Rr={position:{Type:String,default:"left"},title:{Type:String,default:"业务支付申请来源1"},width:{Type:Number,default:200},height:{Type:Number,default:320}},Cu=me(Rr,BC,$C,EC,FC),Lr=e.defineComponent({name:"FListNav",props:Rr,emits:[],setup(t,n){let o=!1;const a=e.ref(t.position),r=e.ref(t.width),i=e.ref(t.title),s=e.computed({set(f){f!=null&&o!==f&&(o=f)},get(){return o}}),l=e.ref(t.height),p=e.computed(()=>s.value?"0px":`${r.value}px`),c=e.computed(()=>s.value?"0px":`${l.value}px`);return()=>e.createVNode("div",{class:`f-list-nav f-list-nav-${a.value}`},[e.createVNode("div",{class:"f-list-nav-in",style:[{width:p.value},{height:c.value}]},[e.createVNode("div",null,[e.createVNode("div",{class:"f-list-nav-main"},[n.slots.navHeader&&e.createVNode("div",{class:"f-list-nav-header"},[n.slots.navHeader()]),!n.slots.navHeader&&i.value&&e.createVNode("div",{class:"f-list-nav-header"},[e.createVNode("div",{class:"f-list-nav-title"},[i.value])])]),n.slots.navContent&&e.createVNode("div",{class:"f-list-nav-content"},[n.slots.navContent()]),n.slots.navFooter&&e.createVNode("div",{class:"f-list-nav-footer"},[n.slots.navFooter()])])])])}});function IC(t,n){const o=ln(),a=e.ref(!1),r=e.ref(!1);let i=!0,s=!1,l,p=!1;function c(x){return l&&l.componentClassList&&l.componentClassList.includes("f-form-layout")&&l.componentClassList.includes("farris-form")?x.sourceType==="control"&&x.controlCategory==="input"||x.sourceType==="move"&&x.controlType==="form-group":!0}function f(x){return!(!Rt().basalDragulaRuleForContainer(x)||!i||!c(x))}function u(){a.value=!1,r.value=!1;const x=t,C=x.appearance&&x.appearance.class||"",w=C.split(" "),V=x.contents||[],N=V.length?V[0]:null,S=N&&N.appearance?N.appearance.class:"",D=S?S.split(" "):[],k=V.length?V.reduce((F,R)=>{const O=R&&R.appearance?R.appearance.class:"",W=O?O.split(" "):[];return F.push(...W),F},[]):[],A=n,$=A&&A.appearance&&A.appearance.class||"",T=$?$.split(" "):[];l={componentClass:C,componentClassList:w,childContents:V,firstChildContent:N,firstChildClass:S,firstChildClassList:D,parent:A,parentClass:$,parentClassList:T,children:V,childrenClassList:k};const{canAccept:E,fixed:B,hidePadding:I}=o.getRuleValue(w[0],l);return i=E,s=I,p=B,!0}function d(x){e.nextTick()}function m(){return t.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function g(x,C){const w=t;if((w.appearance&&w.appearance.class||"").split(" ").includes("f-form-layout")){const{label:S}=x,D=lt("form-group");return D.editor=C,D.label=S,D}return C}function h(x,C,w){const V=t;if((V.appearance&&V.appearance.class||"").split(" ").includes("f-form-layout")){const D=String(x.innerText),k=lt("form-group");return k.editor=w,k.label=D,k}return w}function y(){return!p}function v(){return!p}function b(){return s}return{canAccepts:f,resolveComponentContext:u,getStyles:m,onAcceptNewChildElement:h,onAcceptMovedChildElement:d,onResolveNewComponentSchema:g,triggerBelongedComponentToMoveWhenMoved:a,triggerBelongedComponentToDeleteWhenDeleted:r,checkCanMoveComponent:y,checkCanDeleteComponent:v,hideNestedPaddingInDesginerView:b}}const MC=e.defineComponent({name:"FListNavDesign",props:Rr,emits:[],setup(t,n){var g;const o=e.ref(),a=e.inject("design-item-context"),r=IC(a.schema,(g=a.parent)==null?void 0:g.schema),i=ye(o,a,r);i.value.canMove=!1,i.value.canNested=!1;let s=!1;const l=e.ref(t.position),p=e.ref(t.listNavWidth),c=e.ref(t.title),f=e.computed({set(h){h!=null&&s!==h&&(s=h)},get(){return s}}),u=e.ref(t.height),d=e.computed(()=>f.value?"0px":`${p.value}px`),m=e.computed(()=>f.value?"0px":`${u.value}px`);return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{ref:o,class:`f-list-nav f-list-nav-${l.value}`},[e.createVNode("div",{class:"f-list-nav-in",style:[{width:d.value},{height:m.value}]},[e.createVNode("div",null,[e.createVNode("div",{class:"f-list-nav-main"},[n.slots.navHeader&&e.createVNode("div",{class:"f-list-nav-header"},[n.slots.navHeader()]),!n.slots.navHeader&&c.value&&e.createVNode("div",{class:"f-list-nav-header"},[e.createVNode("div",{class:"f-list-nav-title"},[c.value])])]),n.slots.navContent&&e.createVNode("div",{class:"f-list-nav-content"},[n.slots.navContent()]),n.slots.navFooter&&e.createVNode("div",{class:"f-list-nav-footer"},[n.slots.navFooter()])])])])}}),wu={install(t){t.component(Lr.name,Lr)},register(t,n,o){t["list-nav"]=Lr,n["list-nav"]=Cu},registerDesigner(t,n,o){t["list-nav"]=MC,n["list-nav"]=Cu}};function Vu(t,n,o,a,r,i,s,l,p,c){const f=e.ref(t.size),u=e.ref(t.textField),d=e.ref(t.titleField),m=e.ref(t.multiSelect),g=e.ref(t.disableField),{onMouseenterItem:h,onMouseoverItem:y,onMouseoutItem:v}=i,{getKey:b,listViewItemClass:x,onCheckItem:C,onClickItem:w}=s,V=e.computed(()=>({margin:f.value==="small"?"0.25rem 0":"10px 0"}));function N(S,D,k){return S.checked=l.findIndexInSelectedItems(S)>-1,e.createVNode("li",{class:x(S,D),id:b(S,D),key:b(S,D),onClick:A=>w(A,S,D),onMouseenter:A=>h(A,S,D),onMouseover:A=>y(A,S,D),onMouseout:A=>v(A,S,D)},[m.value&&e.createVNode("div",{class:"f-list-select",onClick:A=>A.stopPropagation()},[e.createVNode(hn,{id:"list-"+b(S,D),customClass:"listview-checkbox",disable:S[g.value]||!S.checked,modelValue:S.checked,"onUpdate:modelValue":A=>S.checked=A,onChange:A=>C(S,D)},null)]),e.createVNode("div",{class:"f-list-content"},[e.createVNode("div",{style:V.value,title:S.raw[d.value]||S.raw[u.value]},[S.raw[u.value]])])])}return{renderItem:N}}function OC(t,n,o,a,r,i,s,l,p,c){const f=e.ref(t.multiSelect),u=e.ref(t.disableField),{onMouseenterItem:d,onMouseoverItem:m,onMouseoutItem:g}=i,{getKey:h,listViewItemClass:y,onCheckItem:v,onClickItem:b}=s;function x(w,V,N){return n.slots.content?e.createVNode(e.Fragment,null,[n.slots.content&&n.slots.content({item:w.raw,index:V,selectedItem:N})]):e.createVNode("div",{style:"margin: 10px 0;"},[w.raw.name])}function C(w,V,N){return e.createVNode("li",{class:y(w,V),id:h(w,V),key:h(w,V),onClick:S=>b(S,w,V),onMouseenter:S=>d(S,w,V),onMouseover:S=>m(S,w,V),onMouseout:S=>g(S,w,V)},[f.value&&e.createVNode("div",{class:"f-list-select",onClick:S=>S.stopPropagation()},[e.createVNode(hn,{id:"list-"+h(w,V),customClass:"listview-checkbox",disable:w[u.value]||!w.checked,modelValue:w.checked,"onUpdate:modelValue":S=>w.checked=S,onChange:S=>v(w,V)},null)]),e.createVNode("div",{class:"f-list-content"},[x(w,V,N)])])}return{renderItem:C}}function PC(t,n,o,a,r,i,s,l,p,c){const f=e.ref(t.multiSelect),u=e.ref(t.disableField),{onMouseenterItem:d,onMouseoverItem:m,onMouseoutItem:g}=i,{getKey:h,listViewItemClass:y,onCheckItem:v,onClickItem:b}=s,{dragstart:x,dragenter:C,dragover:w,dragend:V}=a,{removeItem:N}=p,S=e.computed(()=>({margin:f.value?"10px 0":"10px 0px 10px 14px"}));function D(T){return e.createVNode("div",{style:S.value},[T.raw.name])}function k(){return n.slots.itemContent?n.slots.itemContent:D}const A=k();function $(T,E,B){return e.createVNode("li",{class:y(T,E),id:h(T,E),key:h(T,E),onClick:I=>b(I,T,E),onMouseenter:I=>d(I,T,E),onMouseover:I=>m(I,T,E),onMouseout:I=>g(I,T,E),draggable:"true",onDragstart:I=>x(I,T,E),onDragenter:I=>C(I,E),onDragend:I=>V(I,T),onDragover:I=>w(I,E)},[f.value&&e.createVNode("div",{class:"f-list-select",onClick:I=>I.stopPropagation()},[e.createVNode(hn,{id:"list-"+h(T,E),customClass:"listview-checkbox",disable:T[u.value]||!T.checked,modelValue:T.checked,"onUpdate:modelValue":I=>T.checked=I,onChange:I=>v(T,E)},null)]),e.createVNode("div",{class:"f-list-content"},[A(T)]),e.createVNode("div",{class:"f-list-remove",onClick:I=>N(E)},[e.createVNode("div",{class:"f-list-remove-icon"},[e.createVNode("i",{class:"f-icon f-icon-remove_face"},null)])]),e.createVNode("div",{class:"f-list-handle"},[e.createVNode("div",null,[e.createVNode("i",{class:"f-icon f-icon-drag-vertical"},null)])])])}return{renderItem:$}}function _C(t,n,o,a,r,i,s,l,p,c){var h;const f=e.ref(((h=t.group)==null?void 0:h.groupFields)||[]),{collpaseGroupIconClass:u}=r,{toggleGroupRow:d}=c;function m(y,v){v.collapse=!v.collapse,o.value=d(v.collapse?"collapse":"expand",v,o.value)}function g(y,v,b){return y.layer>-1&&e.createVNode("div",{class:"f-navlookup-recentHeader"},[e.createVNode("div",{class:"fv-grid-group-row-icon",onClick:x=>m(x,y)},[e.createVNode("span",{class:u(y)},null)]),e.createVNode("div",{class:"f-navlookup-recommandLabel"},[y.raw[f.value[y.layer]]])])}return{renderItem:g}}function RC(){const t=e.ref(-1),n=e.ref(""),o=e.ref(-1),a=e.ref(!1);function r(c,f,u){o.value=u}function i(c,f,u){a.value||(o.value=u)}function s(c,f,u){o.value=-1}function l(){a.value=!0}function p(){a.value=!1}return{activeIndex:t,focusedItemId:n,hoverIndex:o,onMouseenterItem:r,onMouseoverItem:i,onMouseoutItem:s,resumeHover:p,suspendHover:l}}function LC(t,n,o,a){const r=e.ref(t.idField),{dataView:i}=o,s=e.ref(-1),l=e.ref(!1),{activeIndex:p,focusedItemId:c,hoverIndex:f,resumeHover:u,suspendHover:d}=a;function m(v,b,x){v.stopPropagation(),d(),b&&setTimeout(()=>{s.value=x,l.value=!0,b.moving=!0})}function g(v,b){if(v.preventDefault(),s.value!==b){const x=i.value[s.value],C=i.value;C.splice(s.value,1),C.splice(b,0,x),s.value=b}}function h(v,b){v.preventDefault(),v.dataTransfer&&(v.dataTransfer.dropEffect="move")}function y(v,b){b&&(b.moving=!1),i.value.forEach((x,C)=>{x.__fv_index__=C}),l.value=!1,u(),f.value=b.raw.__fv_index__,p.value=b.raw.__fv_index__,c.value=b.raw[r.value],n.emit("change",i.value),n.emit("activeChange",b)}return{dragstart:m,dragenter:g,dragover:h,dragend:y,isDragging:l}}function HC(t,n,o){const{dataView:a}=o;function r(i){if(i>-1&&i<a.value.length){const s=a.value.splice(i,1);n.emit("removeItem",s[0])}}return{removeItem:r}}function jC(t,n,o,a,r,i){const s=e.ref(t.idField),l=e.ref(t.disableField),p=e.ref(t.draggable),c=e.ref(t.itemClass),f=e.ref(t.selection.multiSelect??!1),u=e.ref(t.selection.multiSelectMode);e.ref(!0);const{isDragging:d}=a,{activeIndex:m,focusedItemId:g,hoverIndex:h}=r,{clearSelection:y,getSelectedItems:v,toggleSelectItem:b}=i,x=e.ref(v());function C(A,$){const T={"f-list-view-group-item":!0,"f-list-view-draggable-item":p.value,"f-un-click":!A.checked,"f-un-select":!!A.raw[l.value],"f-listview-active":A.raw.__fv_index__===m.value,"f-listview-hover":!d.value&&$===h.value,moving:!!A.moving};return c.value.split(" ").reduce((B,I)=>(B[I]=!0,B),T),T}function w(A,$){return A.raw[s.value]||""}const V=e.computed(()=>!f.value);function N(A,$){!A.checked||A.raw[l.value]||(V.value&&(g.value=A.raw[s.value]),b(A))}const S=e.computed(()=>f.value&&u.value==="OnCheckClearByClick"),D=e.computed(()=>!f.value||f.value&&(u.value==="OnCheckAndClick"||u.value==="OnClick"));function k(A,$,T){if($.raw[l.value]){A.preventDefault(),A.stopPropagation();return}g.value=$.raw[s.value],m.value=T,S.value&&y(o.value),D.value&&b($),n.emit("clickItem",{data:x.value,index:T}),n.emit("activeChange",x.value)}return{getKey:w,listViewItemClass:C,onCheckItem:N,onClickItem:k}}function Nu(t,n,o,a,r,i,s){const l=e.ref(t.view),p=e.ref(t.view==="CardView"),c=e.ref({}),f=e.ref("暂无数据"),u=RC(),d=LC(t,n,a,u),m=HC(t,n,a),g=jC(t,n,o,d,u,i),h=e.computed(()=>({"f-list-view-group":!0,"d-flex":p.value,"flex-wrap":p.value})),y=e.computed(()=>!!o.value&&o.value.length>0),v=e.computed(()=>o.value.length===0),b=e.computed(()=>v.value&&!n.slots.empty);function x(){return l.value==="SingleView"?Vu:l.value==="DraggableView"?PC:(l.value==="ContentView"||l.value==="CardView")&&n.slots.content?OC:Vu}const C=x(),{renderItem:w}=C(t,n,o,d,r,u,g,i,m,s),{renderItem:V}=_C(t,n,o,d,r,u,g,i,m,s),N=[w,V];function S(){return o.value.filter(A=>A.visible!==!1).map((A,$)=>N[A.type](A,$,c))}function D(){return e.createVNode("div",{class:"f-list-view-emptydata"},[e.createVNode("p",{class:"f-empty-title"},[f.value])])}function k(){return e.createVNode("ul",{class:h.value,style:"list-style: none;"},[y.value&&S(),b.value&&D(),n.slots.empty&&n.slots.empty()])}return{renderListArea:k}}function Su(t,n,o){function a(){return n.slots.header&&e.createVNode("div",{class:"f-list-view-header"},[n.slots.header()])}return{renderHeader:a}}function Eo(t,n,o){const a=e.ref(t.headerClass),r=e.ref(t.placeholder),i=e.ref(""),s=e.computed(()=>!i.value),l=e.computed(()=>!!i.value);function p(d){i.value=""}e.watch(i,d=>{o.search(d)});const c=e.computed(()=>{const d={"form-group":!0,"farris-form-group":!0};return a.value&&a.value.split(" ").reduce((g,h)=>(g[h]=!0,g),d),d});function f(d){}function u(){return e.createVNode("div",{class:"f-list-view-header",onClick:e.withModifiers(()=>f,["prevent","stop"])},[e.createVNode("div",{class:c.value},[e.createVNode("div",{class:"farris-input-wrap"},[e.createVNode("div",{class:"f-cmp-inputgroup"},[e.createVNode("div",{class:"input-group f-state-editable"},[e.withDirectives(e.createVNode("input",{class:"form-control f-utils-fill text-left","onUpdate:modelValue":d=>i.value=d,name:"input-group-value",type:"text",placeholder:r.value,autocomplete:"off"},null),[[e.vModelText,i.value]]),e.createVNode("div",{class:"input-group-append"},[l.value&&e.createVNode("span",{class:"input-group-text input-group-clear",onClick:d=>p()},[e.createVNode("i",{class:"f-icon f-icon-close-circle"},null)]),s.value&&e.createVNode("span",{class:"input-group-text"},[e.createVNode("span",{class:"f-icon f-icon-search"},null)])])])])])])])}return{renderHeader:u}}const WC=e.defineComponent({name:"FListViewDesign",props:Xn,emits:["checkValuesChange","clickItem","selectionChange","removeItem","change"],setup(t,n){const o=e.ref(),a=e.ref(!0),r=e.ref(!1),i=e.ref([]),s=0,l=e.ref(t.columns),p=Xt(t),c=Ut(t),f=vn(t,p),u=Gt(t,new Map,c,p),d=Jt(t,u,p,i,n),m=wl(t,o),g=e.ref(),h=e.inject("design-item-context"),y=ye(g,h),v=e.computed(()=>u.dataView.value.length),b=Qt(t,p),x=Pt(),C=Zt(t,{},x),w=Kt(t,b,c,p,x,C),V=Jo(t,p,C,w),N=ea(t,p,C,w),S=Yt(t,l,u,v,s,w,V,N),{getVisualData:D}=S;i.value=D(0,v.value+s-1),e.onMounted(()=>{g.value.componentInstance=y}),n.expose(y.value);const k=e.computed(()=>{const F={"f-list-view":!0,"f-list-view-multiple":t.multiSelect};return t.size!=="default"&&(F[`${t.size}-item`]=!0),F}),A=e.computed(()=>!!n.slots.footer||a.value);function $(){return t.header==="SearchBar"?Eo:t.header==="ContentHeader"?Su:Eo}const T=$(),{renderHeader:E}=T(t,n,m),{renderListArea:B}=Nu(t,n,i,u,f,d,S);function I(F){t.multiSelect&&(F.preventDefault(),F.stopPropagation())}return()=>e.createVNode("div",{class:k.value,onClick:I},[E(),e.createVNode("div",{ref:o,class:"f-list-view-content",onMouseover:()=>{r.value=!0},onMouseleave:()=>{r.value=!1}},[B()]),A.value&&e.createVNode("div",{class:"f-list-view-footer"},[n.slots.footer&&n.slots.footer()])])}}),Hr=e.defineComponent({name:"FListViewTable",props:Xn,emits:["outputValue","currentEvent","selectionChanged"],setup(t,n){const o=[{name:"任芳",code:"1.PO20198989001",date:"2024-02-19",desc:"导游1",amount:63.85,avatar:"./assets/avatar1.png"},{name:"戴秀兰",code:"2.PO20198989002",date:"2024-03-17",desc:"导游2",amount:60.13,avatar:"./assets/avatar2.png"},{name:"尹磊",code:"3.PO20198989003",date:"2024-04-09",desc:"导游3",amount:36.54,avatar:"./assets/avatar3.png"},{name:"赵明",code:"4.PO20198989004",date:"2024-03-27",desc:"导游4",amount:52.76,avatar:"./assets/avatar4.png"},{name:"吕洋",code:"5.PO20198989005",date:"2024-11-17",desc:"导游5",amount:84.13,avatar:"./assets/avatar5.png"}],a=e.computed(()=>t.data.length>0?t.data:o);return()=>{var r;return e.createVNode(e.Fragment,null,[(r=a.value)==null?void 0:r.map(i=>e.createVNode("div",{class:"f-template-listview-row"},[e.createVNode("div",{class:"list-view-item-title"},[e.createVNode("div",{class:"item-title-img"},[e.createVNode("img",{src:i.avatar,alt:"",style:"width: 44px;"},null)]),e.createVNode("div",{class:"item-title"},[e.createVNode("p",{class:"item-title-heading"},[i.code]),e.createVNode("p",{class:"item-title-text"},[i.desc])])]),e.createVNode("div",{class:"list-view-item-content"},[e.createVNode("div",{class:"content-message"},[e.createVNode("div",{class:"ower"},[e.createVNode("p",null,[e.createTextVNode("创建人")]),e.createVNode("p",{class:"con"},[i.name])]),e.createVNode("div",{class:"date"},[e.createVNode("p",null,[e.createTextVNode("创建时间")]),e.createVNode("p",{class:"con"},[i.date])])])])]))])}}}),qC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/list-view-table.schema.json",title:"list-view-table",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for list-view-table",type:"string"},type:{description:"The type string of list-view-table",type:"string",default:"list-view-table"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},zC={title:"list-view-table",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Tu={data:{type:Array,default:[]}},Du=me(Tu,qC,vl,xl,zC),GC=e.defineComponent({name:"FListViewTableDesign",props:Tu,emits:["outputValue","currentEvent","selectionChanged"],setup(t,n){const o=[{name:"任芳",code:"1.山东大学",date:"2024-02-19",desc:"山东济南",amount:63.85,avatar:"./assets/avatar1.png"},{name:"戴秀兰",code:"2.山东建筑大学",date:"2024-03-17",desc:"山东济南",amount:60.13,avatar:"./assets/avatar2.png"},{name:"尹磊",code:"3.山东财经大学",date:"2024-04-09",desc:"山东济南",amount:36.54,avatar:"./assets/avatar3.png"},{name:"赵明",code:"4.北京大学",date:"2024-03-27",desc:"北京市",amount:52.76,avatar:"./assets/avatar4.png"},{name:"吕洋",code:"5.南京大学",date:"2024-11-17",desc:"江苏南京",amount:84.13,avatar:"./assets/avatar5.png"},{name:"吕娥",code:"6.清华大学",date:"2024-03-17",desc:"北京市",amount:52.76,avatar:"./assets/avatar6.png"},{name:"赵强",code:"7.浙江大学",date:"2024-08-01",desc:"浙江杭州",amount:84.13,avatar:"./assets/avatar7.png"}],a=e.computed(()=>t.data.length>0?t.data:o),r=e.ref(),i=e.inject("design-item-context"),s=ye(r,i);return e.onMounted(()=>{r.value.componentInstance=s}),n.expose(s.value),()=>{var l;return e.createVNode("div",{ref:r},[(l=a.value)==null?void 0:l.map(p=>e.createVNode("div",{class:"f-template-listview-row"},[e.createVNode("div",{class:"list-view-item-title"},[e.createVNode("div",{class:"item-title-img"},[e.createVNode("img",{src:p.avatar,alt:"",style:"width: 44px;"},null)]),e.createVNode("div",{class:"item-title"},[e.createVNode("p",{class:"item-title-heading"},[p.code]),e.createVNode("p",{class:"item-title-text"},[p.desc])])]),e.createVNode("div",{class:"list-view-item-content"},[e.createVNode("div",{class:"content-message"},[e.createVNode("div",{class:"ower"},[e.createVNode("p",null,[e.createTextVNode("负责人")]),e.createVNode("p",{class:"con"},[p.name])]),e.createVNode("div",{class:"date"},[e.createVNode("p",null,[e.createTextVNode("预约时间")]),e.createVNode("p",{class:"con"},[p.date])])])]),e.createVNode("div",{class:"list-view-item-operate"},null)]))])}}}),ku={install(t){t.component(Tt.name,Tt),t.component(Hr.name,Hr)},register(t,n,o){t["list-view"]=Tt,n["list-view"]=Cl,t["list-view-table"]=Hr,n["list-view-table"]=Du},registerDesigner(t,n,o){t["list-view"]=WC,n["list-view"]=Cl,t["list-view-table"]=GC,n["list-view-table"]=Du}},UC={title:"lookup",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"lookup",editor:{type:"waiting for modification",enum:[]}},label:{title:"标签",type:"string"}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},bindField:{description:"帮助绑定字段",title:"绑定字段",type:"string",editor:{type:"field-selector"}},textField:{description:"帮助显示文本字段",title:"文本字段",type:"string",editor:{type:"field-selector",bindingType:{enable:!1}}},mappingFields:{description:"帮助字段映射",title:"字段映射",type:"string",editor:{type:"mapping-editor",modalWidth:800,modalHeight:600}}}},lookup:{description:"Basic Infomation",title:"帮助",properties:{textField:{description:"帮助显示文本字段",title:"文本字段",type:"string",editor:{type:"field-selector"}}}}}},YC=new Map([["appearance",ge]]),ZC={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/lookup.schema.json",title:"lookup",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"lookup"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:"帮助"},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},textField:{description:"帮助显示文本字段",type:"string",default:""},mappingFields:{description:"帮助字段映射",type:"object",default:{}}},required:["id","type"]};function KC(t,n,o){return n}const Bo={id:{type:String,require:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},fitColumns:{type:Boolean,default:!0},columns:{type:Array,default:[]},idField:{type:String,default:"id"},textField:{type:String,defalut:"name"},data:{type:Array,default:[]},displayType:{type:String,default:"list"},dialog:{type:Object,default:{width:800,height:600,title:"选择"}},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},enableSearch:{type:Boolean,default:!1},pagination:{type:Object,default:{enable:!1,list:[10,20,50,100,200,500,1e3],size:20,index:1}},enableClear:{type:Boolean,default:!0},inputType:{type:String,default:"text"},idValue:{type:String,default:""},beforeOpenDialog:{type:Function,default:null},beforeSubmit:{type:Function,default:null},dialogClosed:{type:Function,default:null},enableSearchBar:{type:Boolean,default:!0},searchFields:{type:Array,default:[]},showAllSearchColumns:{type:Boolean,default:!0}},Au=me(Bo,ZC,YC,KC,UC),QC=e.defineComponent({name:"FLookupDesign",props:Bo,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{class:"f-lookup-design"},[e.createVNode(dt,{ref:o,id:t.id,disable:!1,readonly:!1,editable:!1,inputType:"text"},null)])}});function $u(t){function n(){const r={enable:!1,list:[10,20,50,100,200,500,1e3],size:20,index:1};return t.pagination?Object.assign({},r,t.pagination):r}function o(){return{enableSelectRow:!0,multiSelect:t.multiSelect,showCheckbox:t.multiSelect,multiSelectMode:"DependOnCheck"}}function a(){return{fitColumns:t.fitColumns,fitMode:"percentage"}}return{checkPaination:n,checkMultiSelect:o,checkColumnOptions:a}}function XC(t,n){const{checkPaination:o,checkMultiSelect:a,checkColumnOptions:r}=$u(t),i=o(),s=a(),l=r(),p=e.ref(),c=e.ref([]),f=e.ref([]),u=e.ref(t.data||[]);e.watch(()=>t.data,g=>{var h;u.value=g,(h=p.value)==null||h.updateDataSource(u.value)}),e.watch(()=>t.idValue,g=>{c.value=g.split(t.separator)}),e.watch(()=>f.value,g=>{n.emit("selectionsChanged",g),n.emit("update:modelValue",g)});function d(g){f.value=g}function m(){return e.createVNode(Mn,{ref:p,pagination:i,summary:{enable:!1},columnOption:l,idField:t.idField,rowNumber:{enable:!1},showBorder:!0,fit:!0,columns:t.columns,data:u.value,selection:s,selectionValues:c.value,onSelectionChange:d},null)}return{datagridRef:p,selectedItems:f,selectionValues:c,renderDataGrid:m}}const JC={install(t){t.component(On.name,On)},register(t,n,o){t["tree-grid"]=On,n["tree-grid"]=lC}};function e1(t,n){const{checkMultiSelect:o,checkColumnOptions:a}=$u(t),r=o(),i=a(),s=e.ref(),l=e.ref([]),p=e.ref([]);e.watch(()=>p.value,u=>{n.emit("selectionsChanged",u),n.emit("update:modelValue",u)});function c(u){p.value=u}function f(){return e.createVNode(On,{ref:s,fit:!0,data:t.data,idField:t.idField,columns:t.columns,rowNumber:{enable:!1},columnOption:i,selection:r,showBorder:!0,onSelectionChange:c},null)}return{treegridRef:s,selectedTreeNodes:p,selectionTreeValues:l,renderTreeGrid:f}}const t1={fields:{type:Array,default:()=>[]},showAllColumns:{type:Boolean,default:!0}},n1=e.defineComponent({name:"FLookupSearchBar",props:t1,emits:["search"],setup(t,n){const o=e.ref(t.fields||[]),a=e.ref(""),r=e.ref("");function i(){if(!o.value.length)return;let c="";t.showAllColumns&&(c="*"),c=o.value[0].value;const f=o.value.find(u=>!!u.isDefault);f&&(c=f.value),a.value=c}function s(){r.value="",n.emit("search",{field:a.value,value:r.value})}function l(){n.emit("search",{field:a.value,value:r.value})}function p(c){c.key==="Enter"&&l()}return e.onMounted(()=>{t.showAllColumns&&(o.value=[{label:"所有列",value:"*"},...o.value]),i()}),()=>e.createVNode("div",{class:"fv-lookup-search-bar d-flex flex-row"},[e.createVNode("div",{style:"width: 160px;"},[e.createVNode(rt,{data:o.value,textField:"label",valueField:"value",idField:"value",modelValue:a.value,"onUpdate:modelValue":c=>a.value=c,enableClear:!1},null)]),e.createVNode("div",{class:"f-utils-fill ml-2"},[e.createVNode(dt,{buttonContent:'<i class="f-icon f-icon-search"></i>',modelValue:r.value,"onUpdate:modelValue":c=>r.value=c,onClickButton:l,enableClear:!0,onClear:s,onKeyup:p},null)])])}});function o1(t,n){function o(r){n.emit("search",r)}function a(){if(t.enableSearchBar&&t.searchFields&&t.searchFields.length>0)return e.createVNode("div",{class:"px-2"},[e.createVNode(n1,{fields:t.searchFields,showAllColumns:t.showAllSearchColumns,onSearch:o},null)])}return{renderSearchBar:a}}const a1=e.defineComponent({name:"LookupContainer",props:Bo,emits:["search","selectionsChanged","update:modelValue"],setup(t,n){const{renderDataGrid:o}=XC(t,n),{renderTreeGrid:a}=e1(t,n),{renderSearchBar:r}=o1(t,n);function i(){return t.displayType==="tree"?a():o()}return()=>e.createVNode("div",{class:"h-100 d-flex flex-column mx-2"},[r(),e.createVNode("div",{class:"f-utils-fill p-2",style:"position: relative;"},[i()])])}}),r1={showCloseButton:{type:Boolean,default:!0},position:{type:String,default:"top-center"},timeout:{type:Number,default:3e3},theme:{type:String,default:"bootstrap"},left:{type:Number},right:{type:Number},top:{type:Number},bottom:{type:Number},id:{type:String},animate:{type:String,default:"fadeIn"},options:{type:Object}},i1={showCloseButton:{type:Boolean,default:!0},animate:{type:String,default:"fadeIn"},options:{type:Object}},jr=e.defineComponent({name:"Toast",props:i1,emits:["close","click"],setup:(t,n)=>{const o=e.ref(t.animate),a="fadeOut",r=e.computed(()=>t.options),i=e.ref(!1),s=e.computed(()=>{const v={animated:i.value,toast:!0};return v[t.animate]=!1,v[a]=i.value,v[r.value.type]=!0,r.value.theme&&(v[r.value.theme]=!0),v}),l=e.computed(()=>{const x=`f-icon-${r.value&&r.value.type?r.value.type.replace("toasty-type-",""):"default"}`,C={"f-icon":!0};return C[x]=!0,C}),p=e.computed(()=>r.value.title||r.value.message),c=e.computed(()=>r.value.title&&r.value.message),f=e.computed(()=>!r.value.title&&r.value.message),u=e.computed(()=>t.showCloseButton),d=e.computed(()=>!!r.value.buttons||!!n.slots.default);function m(v){v.stopPropagation(),v.preventDefault(),i.value=!1,setTimeout(()=>{n.emit("close",r.value)},200)}function g(v,b){}function h(v){return`f-preten-link ${v.customClass?v.customClass:""}`}e.watch(o,()=>{o.value});const y=()=>{var v;return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"after-toast-msg text-right"},[!n.slots.default&&((v=r.value.buttons)==null?void 0:v.map(b=>e.createVNode("span",{class:h(b),onClick:x=>void 0},[b.text]))),n.slots.default&&n.slots.default()])])};return()=>e.createVNode("div",{class:s.value},[u.value&&e.createVNode("button",{title:"close",class:"toast-close f-btn-icon f-bare",onClick:m},[e.createVNode("span",{class:"f-icon modal_close"},null)]),p.value&&e.createVNode("section",{class:"modal-tips"},[e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:l.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[c.value&&e.createVNode(e.Fragment,null,[e.createVNode("h5",{class:"toast-title modal-tips-title",innerHTML:r.value.title},null),e.createVNode("p",{class:"toast-msg",innerHTML:r.value.message},null),d.value&&y()]),f.value&&(r.value.buttons?e.createVNode("div",{class:"toast-title-btns-wrapper d-flex"},[e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null),e.createVNode("div",{class:"after-toast-title text-right ml-auto"},[y()])]):e.createVNode("h5",{class:"toast-title modal-tips-title only-toast-msg",innerHTML:r.value.message},null))])])])}}),Wr=e.defineComponent({name:"Notify",props:r1,emits:["close","empty"],setup(t,n){const o=e.computed(()=>({"farris-notify":!0})),a={left:12,right:12,top:20,bottom:12},r=e.ref(),i=e.ref(t.options),s=e.ref(t.showCloseButton),l=e.computed(()=>t.position||"bottom-right"),p=e.computed(()=>t.timeout!=null?t.timeout:3e3),c=e.computed(()=>{const d=t.bottom?t.bottom:a.bottom,m=t.top?t.top:a.top,g={transition:"all 0.2s ease",left:l.value.indexOf("left")>-1?`${t.left?t.left:a.left}px`:"",right:l.value.indexOf("right")>-1?`${t.right?t.right:a.right}px`:"",top:l.value.indexOf("top")>-1?`${m}px`:"",bottom:l.value.indexOf("bottom")>-1?`${d}px`:""};return l.value.indexOf("center")>-1&&(g.left="50%",g.marginLeft="calc(-24rem / 2)",l.value==="center-center"&&(g.top="50%",g.transform="translate(-50%, -50%)")),g});function f(d){n.emit("close")}p.value&&setTimeout(()=>{f()},p.value),n.expose({closeToast:f,container:r,notifyPosition:l});function u(d,m){f()}return()=>e.createVNode("div",{class:o.value,style:c.value,ref:r},[e.createVNode(jr,{options:i.value,showCloseButton:s.value,animate:t.animate,onClose:d=>u(d,i.value)},null)])}});class Fo{constructor(){P(this,"notifyRefs",[]);P(this,"globalConfig",e.reactive({}))}createNotifyInstance(n){const o=this,r=Object.assign({timeout:3e3,position:"bottom-right",showCloseButton:!0},this.globalConfig,{...n}),i=document.createElement("div");i.style.display="contents";const s=e.createApp({setup(){const l=e.ref();function p(){l.value.container.style.transform="scale(0)",setTimeout(()=>{o.updateNotifyPositionForClose(r,l),s.unmount()},220)}if(r.position.indexOf("top")>-1){const c=o.getNotifyInstances(r.position),f=c[c.length-1];if(f){const u=f.value.container.getBoundingClientRect();r.top=u.bottom}}return e.onUnmounted(()=>{document.body.removeChild(i)}),e.onMounted(()=>{o.updateNotifyPositionForCreate(r,l)}),()=>e.createVNode(Wr,e.mergeProps({ref:l},r,{onClose:p}),null)}});return s.provide("NotifyService",this),document.body.appendChild(i),s.mount(i),s}getNotifyInstances(n){return this.notifyRefs.filter(o=>o.value.notifyPosition===n)}updateNotifyPositionForCreate(n,o){if(this.notifyRefs&&this.notifyRefs.length){const a=window.innerHeight;n.position.indexOf("bottom")>-1&&this.getNotifyInstances(n.position).forEach(r=>{const i=r.value.container.getBoundingClientRect();r.value.container.style.bottom=i.height+a-i.bottom+"px"})}this.notifyRefs=[...this.notifyRefs,o]}updateNotifyPositionForClose(n,o){const a=this.notifyRefs.indexOf(o);if(n.position.indexOf("top")>-1){const r=this.getNotifyInstances(n.position),i=r.indexOf(o);r.slice(i+1).forEach(s=>{s.value.container.style.top=s.value.container.offsetTop-s.value.container.offsetHeight+"px"})}a>-1&&this.notifyRefs.splice(a,1)}show(n){return this.createNotifyInstance(n)}buildNotifyProps(n,o){let a="",r="",i,s,l;typeof o=="string"?a=o:o&&(a=o.message||"",r=o.title||"",s=o.position||null,l=o.showCloseButton!=null?o.showCloseButton:null,i=o.timeout!=null?o.timeout:null);const c={options:{type:n,message:a,title:r}};return s!=null&&(c.position=s),l!=null&&(c.showCloseButton=l),i!=null&&(c.timeout=i),c}info(n){const o=this.buildNotifyProps("info",n);return this.show(o)}success(n){const o=this.buildNotifyProps("success",n);return this.show(o)}warning(n){const o=this.buildNotifyProps("warning",n);return this.show(o)}error(n){const o=this.buildNotifyProps("error",n);return this.show(o)}close(n){n&&n.unmount()}closeAll(){this.notifyRefs.forEach(n=>{n==null||n.value.closeToast()}),this.notifyRefs.length=0}}const s1={install(t){t.component(Wr.name,Wr),t.component(jr.name,jr),t.provide("FNotifyService",new Fo)}};function l1(t,n,o){var c,f,u;const a=new Fo,r=e.ref(t.dialog);function i(){if(o.value.length===0){a.warning({message:"请选择数据!",position:"top-center"});return}const d=o.value.map(g=>g[t.textField]).join(t.separator),m=o.value.map(g=>g[t.idField]).join(t.separator);n.emit("update:modelValue",d),n.emit("update:idValue",m)}async function s(){let d=!0,m="";if(t.beforeSubmit&&typeof t.beforeSubmit=="function"){const g=await t.beforeSubmit({selectedItems:o.value});typeof g=="boolean"&&(d=g),typeof g=="object"&&(d=g.continue,m=g.message||"")}return d?(i(),!0):(m&&a.warning({message:m,position:"top-center"}),!1)}async function l(d){let m=!0;if(t.beforeOpenDialog&&typeof t.beforeOpenDialog=="function"){const g=await t.beforeOpenDialog(d);typeof g=="boolean"&&!g&&(m=!1),typeof g=="object"&&(g.continue||(m=!1,g.message&&a.error({message:g.message,position:"top-center"})))}return m}return{modalOptions:{title:(c=r.value)==null?void 0:c.title,fitContent:!1,height:((f=r.value)==null?void 0:f.height)||800,width:((u=r.value)==null?void 0:u.width)||600,closedCallback:d=>{t.dialogClosed&&typeof t.dialogClosed=="function"&&t.dialogClosed({button:d.target,selectedItems:o.value})},buttons:[{name:"cancel",text:"取消",class:"btn btn-light",handle:d=>!0},{name:"accept",text:"确定",class:"btn btn-primary",handle:d=>s()}]},beforeOpenDialog:l}}const qr=e.defineComponent({name:"FLookup",props:Bo,emits:["update:modelValue","update:idValue","pageSizeChanged","search","pageChanged"],setup(t,n){const o='<i class="f-icon f-icon-lookup"></i>',a=e.ref(),r=e.ref(),i=e.ref([]),{modalOptions:s,beforeOpenDialog:l}=l1(t,n,i);e.onMounted(()=>{});function p(){i.value=[],n.emit("update:modelValue",""),n.emit("update:idValue","")}function c(f){return n.emit("search",f)}return()=>e.createVNode(dt,{ref:a,id:t.id,disable:t.disable,readonly:t.readonly,editable:t.editable,inputType:"text",enableClear:t.enableClear,buttonContent:o,buttonBehavior:"Modal",modalOptions:s,onClear:p,beforeOpen:l},{default:()=>[e.createVNode(a1,e.mergeProps({ref:r},t,{modelValue:i.value,"onUpdate:modelValue":f=>i.value=f,onSearch:c}),null)]})}}),Eu={install(t){t.component(qr.name,qr)},register(t,n,o){t.lookup=qr,n.lookup=Au},registerDesigner(t,n,o){t.lookup=QC,n.lookup=Au}},c1={type:{Type:String,default:"info"},title:{Type:String,default:""},detail:{Type:String,default:""},okButtonText:{Type:String,default:"确定"},cancelButtonText:{Type:String,default:"取消"},exceptionInfo:{Type:Object,default:null},promptEditorType:{Type:String,default:"text-area"}};function zr(){return new DOMException("The request is not allowed","NotAllowedError")}async function d1(t){if(!navigator.clipboard)throw zr();return navigator.clipboard.writeText(t)}async function u1(t){const n=document.createElement("span");n.textContent=t,n.style.whiteSpace="pre",n.style.webkitUserSelect="auto",n.style.userSelect="all",document.body.appendChild(n);const o=window.getSelection(),a=window.document.createRange();o==null||o.removeAllRanges(),a.selectNode(n),o==null||o.addRange(a);let r=!1;try{r=window.document.execCommand("copy")}finally{o==null||o.removeAllRanges(),window.document.body.removeChild(n)}if(!r)throw zr()}async function f1(t){try{await d1(t)}catch(n){try{await u1(t)}catch(o){throw o||n||zr()}}}function p1(){async function t(n){await f1(n)}return{onCopy:t}}function m1(t,n,o,a){const r=e.ref(14),i=e.ref(140),s=e.ref(""),l=e.ref(a.value.length),p=e.computed(()=>a.value),c=e.computed(()=>({"font-size":`${r.value}px`,height:"100%"}));function f(u){if(u.currentTarget){const d=u.currentTarget.value||"";l.value=d.length}}return()=>e.createVNode(e.Fragment,null,[e.createVNode("textarea",{title:"promptMessage",name:"promptMessage",class:"form-control",style:c.value,rows:"4",maxlength:i.value,onInput:u=>f(u)},[p.value]),e.createVNode("span",{class:"textarea-wordcount",title:s.value,style:"position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"},[l.value+" / "+i.value])])}function h1(t,n,o,a){const r=m1(t,n,o,a),i=new Map([["text-area",r]]);function s(l){return i.get(l)||null}return{getEditorRender:s}}function g1(){const t=e.ref(!1),n=e.ref("复制成功");return{feedbackStyle:e.computed(()=>{const a={position:"absolute",left:"50%",top:"50%",width:"100px",height:"40px",background:"#303C53","line-height":"40px","text-align":"center","margin-left":"-30px","margin-top":"-50px","border-radius":"10px","box-shadow":"0px 2px 8px 0px",color:"#fff",transition:"all .3s ease"};return a.opacity=t.value?"0.8":"0",a.display=t.value?"":"none",a}),feedbackMessage:n,toShowFeedback:t}}function y1(t,n){const o=n.getEditorRender(t.promptEditorType);return()=>o&&o()}function b1(t){const n=e.ref(3),o=e.ref(480),a=e.computed(()=>!!t.value&&!!t.value.date),r=e.computed(()=>`发生时间 : ${t.value&&t.value.date||""}`),i=e.computed(()=>!!t.value&&!!t.value.detail),s=e.computed(()=>{const y=`${o.value}px`;return{overflow:"hidden","text-overflow":"ellipsis",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":n.value,"max-height":y}}),l=e.computed(()=>t.value&&t.value.detail||""),p=e.computed(()=>!0),c=e.ref(!1),f=e.ref("展开"),u=e.ref("收起"),d=e.computed(()=>{const y={display:"block",color:"#2A87FF"};return y["text-align"]=c.value?"":"right",y});function m(y,v){c.value=!c.value,n.value=c.value?20:3}function g(y){return m()}function h(y){return m()}return()=>e.createVNode("div",{class:"toast-msg-detail"},[a.value&&e.createVNode("div",null,[r.value]),i.value&&e.createVNode("div",{id:"exception_error_msg",ref:"exceptionMessageRef",style:s.value},[e.createTextVNode("详细信息 : "),e.createVNode("span",{innerHTML:l.value},null)]),p.value&&e.createVNode("span",{style:d.value},[c.value&&e.createVNode("span",{onClick:g,style:"cursor: pointer;"},[u.value]),!c.value&&e.createVNode("span",{onClick:h,style:"cursor: pointer;"},[f.value])])])}function v1(t){return()=>e.createVNode("p",{class:"toast-msg-detail",innerHTML:t.value},null)}function x1(t,n,o,a){const r=e.ref(t.exceptionInfo),i=e.computed(()=>{const d={"f-icon":!0},m=`f-icon-${n.value}`;return d[m]=!0,d}),s=e.computed(()=>o.value||r.value&&r.value.message),l=e.computed(()=>a.value),p=e.computed(()=>!!a.value),c=e.computed(()=>!!r.value);function f(){return c.value?b1(r):p.value?v1(l):()=>null}const u=f();return()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"float-left modal-tips-iconwrap"},[e.createVNode("span",{class:i.value},null)]),e.createVNode("div",{class:"modal-tips-content"},[e.createVNode("p",{class:"toast-msg-title",innerHTML:s.value},null),u()])])}function C1(t,n,o){const{onCopy:a}=n,{toShowFeedback:r}=o,i=e.ref("复制成功"),s=e.ref("复制详细信息"),l=e.ref(t.exceptionInfo||{date:"",message:"",detail:""}),p=e.computed(()=>l.value&&l.value.detail||"");function c(f){a(p.value).catch(u=>{i.value="复制失败"}).finally(()=>{r.value=!0,setTimeout(()=>{r.value=!1},700)})}return()=>e.createVNode("span",{style:"width: 100%;color: #2A87FF;padding-left: 37px;"},[e.createVNode("span",{onClick:c,style:"cursor: pointer;"},[s.value])])}function w1(t,n,o,a){const r=e.ref(t.type),i=e.ref([]),s=e.ref(t.exceptionInfo),l=e.ref(t.okButtonText),p=e.ref(t.cancelButtonText),c=e.ref(!0),f=e.ref(!0),u=e.computed(()=>!!(i.value&&i.value.length)),d=e.computed(()=>s.value&&s.value.date&&s.value.message&&s.value.detail),m=e.computed(()=>!(i.value&&i.value.length)&&(l.value||p.value)),g=e.computed(()=>f.value&&l.value),h=e.computed(()=>c.value&&p.value),y=C1(t,o,a);function v(x){r.value==="question"&&n.emit("reject"),n.emit("close")}function b(x){r.value==="question"&&n.emit("accept"),n.emit("close")}return()=>e.createVNode("div",{class:"modal-footer"},[d.value&&y(),m.value&&h.value&&e.createVNode("button",{type:"button",class:"btn btn-secondary btn-lg",onClick:v},[p.value]),m.value&&g.value&&e.createVNode("button",{type:"button",class:"btn btn-primary btn-lg",onClick:b},[l.value]),u.value&&i.value.length&&i.value.map(x=>e.createVNode("button",{type:"button",onClick:x.handle,class:x.class},[x.iconClass&&e.createVNode("span",{class:x.iconClass},null),x.text]))])}const Gr=e.defineComponent({name:"FMessageBox",props:c1,emits:["accept","reject","close"],setup(t,n){const o=e.ref(t.type),a=e.ref(t.title),r=e.ref(t.detail),i=e.computed(()=>{const y={"modal-tips":!0,"d-flex":!0,"flex-row":!0},v=`messager-type-${o.value}`;return y[v]=!0,y}),s=e.computed(()=>{const y={};return o.value==="prompt"?y.padding="0.5rem 0.5rem 1rem 1.5rem":o.value==="error"&&(y.padding="0.5rem 1.5rem 1rem 1.5rem"),y}),l=p1(),p=h1(t,o,a,r),c=g1(),{feedbackStyle:f,feedbackMessage:u}=c;function d(){return e.createVNode("div",{style:f.value},[u.value])}function m(){switch(o.value){case"prompt":return y1(t,p);default:return x1(t,o,a,r)}}const g=m(),h=w1(t,n,l,c);return()=>e.createVNode("div",{class:"farris-messager"},[e.createVNode("section",{class:i.value,style:s.value},[g()]),h(),d()])}});class Io{static show(n){const o=e.reactive({...n}),a=!1,r=o.type==="error"||o.type==="prompt",i=o.type==="error"?"错误提示":o.type==="prompt"&&o.title||"",s=o.acceptCallback||(()=>{}),l=o.rejectCallback||(()=>{});let p;const c=()=>{p&&p.unmount()};p=an.show({class:"modal-message modal-message-type-info",title:i,showButtons:a,showHeader:r,render:()=>e.createVNode(Gr,e.mergeProps(o,{onAccept:s,onReject:l,onClose:c}),null)})}static info(n,o){const a=e.reactive({type:"info",title:n,detail:o,okButtonText:"知道了",cancelButtonText:""});this.show(a)}static warning(n,o){const a=e.reactive({type:"warning",title:n,detail:o,okButtonText:"知道了",cancelButtonText:""});this.show(a)}static success(n,o){const a=e.reactive({type:"success",title:n,detail:o,okButtonText:"关闭",cancelButtonText:""});this.show(a)}static error(n,o,a){const r=e.reactive({type:"error",okButtonText:"关闭",cancelButtonText:"",exceptionInfo:{date:a,message:n,detail:o}});this.show(r)}static prompt(n,o){const a=e.reactive({type:"prompt",title:n,detail:o,okButtonText:"确定",cancelButtonText:"取消"});this.show(a)}static question(n,o,a,r){const i=e.reactive({type:"question",title:n,detail:o,okButtonText:"确定",cancelButtonText:"取消",acceptCallback:a,rejectCallback:r});this.show(i)}}const V1={install(t){t.component(Gr.name,Gr),t.provide("FMessageBoxService",Io)}},N1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/mapping-editor.schema.json",title:"field-selector",description:"A Farris Input Component",type:"object",properties:{}},Bu={disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},title:{type:String,default:"字段映射编辑器"},modalWidth:{type:Number,default:600},modalHeight:{type:Number,default:500},modelValue:{type:Object,default:{}}},S1=me(Bu,N1),Ur=e.defineComponent({name:"FMappingEditor",props:Bu,emits:["submitModal","update:modelValue"],setup(t,n){const o='<i class="f-icon f-icon-lookup"></i>',a=e.ref(),r=e.ref(t.modelValue||{}),i=e.ref(),s=[{field:"sourceField",title:"数据源字段",dataType:"string"},{field:"targetField",title:"目标字段",dataType:"string"}];function l(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}const p=e.computed(()=>Object.keys(r.value).map(v=>({id:l(),sourceField:v,targetField:r.value[v]}))),c=e.computed(()=>{var v;return`共 ${((v=p.value)==null?void 0:v.length)||0} 项`});function f(){var v;(v=a.value)==null||v.addNewDataItem()}function u(){return{sourceField:"",targetField:"",id:l()}}function d(){if(i!=null&&i.value.length){const v=p.value.findIndex(b=>b.id===(i==null?void 0:i.value[0].id));a==null||a.value.removeDataItem(v)}}function m(){Io.question("确定要清空所有映射关系吗?","",()=>{var v;r.value={},(v=a.value)==null||v.updateDataSource([])},()=>{})}function g(){const v={};return p.value.forEach(b=>{v[b.sourceField]=b.targetField}),v}e.watch(()=>t.modelValue,v=>{r.value=v});const h={title:t.title,fitContent:!1,height:t.modalHeight,width:t.modalWidth,acceptCallback:()=>{const v=g();r.value=v,n.emit("submitModal",v),n.emit("update:modelValue",v)},rejectCallback:()=>{}};function y(v){i.value=v}return()=>e.createVNode(dt,{modelValue:c.value,"onUpdate:modelValue":v=>c.value=v,editable:!1,disabled:t.disabled,readonly:t.readonly,inputType:"text",enableClear:!1,buttonContent:o,buttonBehavior:"Modal",modalOptions:h},{default:()=>[e.createVNode("div",{class:"h-100 d-flex flex-column"},[e.createVNode("div",{class:"px-2"},[e.createVNode("button",{class:"btn btn-primary",onClick:f},[e.createTextVNode("新增")]),e.createVNode("button",{class:"btn btn-secondary ml-2",onClick:d},[e.createTextVNode("删除")]),e.createVNode("button",{class:"btn btn-secondary ml-3",onClick:m},[e.createTextVNode("清空")])]),e.createVNode("div",{class:" f-utils-fill p-2"},[e.createVNode(Mn,{ref:a,pagination:{enable:!1},summary:{enable:!1},columnOption:{fitColumns:!0},editOption:{editMode:"cell"},rowNumber:!1,showBorder:!0,editable:"true",fit:!0,columns:s,data:p.value,newDataItem:u,onSelectionChange:y},null)])])]})}}),Fu={install(t){t.component(Ur.name,Ur)},register(t,n,o){t["mapping-editor"]=Ur,n["mapping-editor"]=S1}},T1=new Map([["appearance",ge]]),D1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/nav.schema.json",title:"nav",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a nav",type:"string"},type:{description:"The type string of nav component",type:"string",default:"nav"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function k1(t,n,o){return n}const A1={title:"nav",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},Yr={maxNum:{Type:Number,default:99},navData:{Type:Array,default:[{id:"1",text:"全部"},{id:"2",text:"已回复",disable:!0},{id:"3",text:"待回复",num:200},{id:"4",text:"@我",num:33}]},horizontal:{Type:Boolean,default:!0},activeNavId:{Type:String,default:"1"},navPicking:{Type:Function,default:t=>vt}},Iu=me(Yr,D1,T1,k1,A1),Zr=e.defineComponent({name:"FNav",props:Yr,emits:["nav"],setup(t,n){const o=e.ref(t.activeNavId),a=e.ref(t.navData),r=e.ref(t.horizontal);e.ref(t.navPicking);const i=e.computed({get(){return a.value},set(f){a.value=f,p()}}),s=e.computed({get(){return o.value},set(f){if(o.value=f,o.value&&i&&i.value.length){const u=i.value.find(d=>d.id===o.value);u&&n.emit("nav",u)}}}),l=e.computed({set(f){r.value=f},get(){return r.value}});function p(){if(i.value&&i.value.length&&!o.value){const f=i.value.find(u=>!u.disable);f&&(o.value=f.id)}}function c(f){f.disable||f.id===o.value||(o.value=f.id,n.emit("nav",f))}return()=>{var f;return e.createVNode("div",{class:["farris-nav",{"farris-nav-vertical":!l.value}]},[(f=i.value)==null?void 0:f.map(u=>e.createVNode("div",{class:["farris-nav-item",{active:u.id===s.value},{disabled:u.disable}],onClick:()=>c(u)},[e.createVNode("div",{class:"farris-nav-item-link"},[e.createVNode("span",{class:"farris-nav-item-link-text"},[u.text,u.num&&e.createVNode("div",{class:"farris-nav-item-tag"},[u.num<=t.maxNum&&e.createVNode("span",{class:"tag-text"},[u.num]),u.num>t.maxNum&&e.createVNode("span",{class:"tag-text"},[t.maxNum,e.createTextVNode("+")])])])])]))])}}}),$1=e.defineComponent({name:"FNavDesign",props:Yr,emits:["nav"],setup(t,n){var g;const o=e.ref(t.activeNavId),a=e.ref(t.navData),r=e.ref(t.horizontal);e.ref(t.navPicking);const i=e.ref(),s=e.inject("design-item-context"),l=cn(s.schema,(g=s.parent)==null?void 0:g.schema),p=ye(i,s,l);e.onMounted(()=>{i.value.componentInstance=p}),n.expose(p.value);const c=e.computed({get(){return a.value},set(h){a.value=h,d()}}),f=e.computed({get(){return o.value},set(h){if(o.value=h,o.value&&c&&c.value.length){const y=c.value.find(v=>v.id===o.value);y&&n.emit("nav",y)}}}),u=e.computed({set(h){r.value=h},get(){return r.value}});function d(){if(c.value&&c.value.length&&!o.value){const h=c.value.find(y=>!y.disable);h&&(o.value=h.id)}}function m(h){h.disable||h.id===o.value||(o.value=h.id,n.emit("nav",h))}return()=>{var h;return e.createVNode("div",{ref:i,class:["farris-nav",{"farris-nav-vertical":!u.value}]},[(h=c.value)==null?void 0:h.map(y=>e.createVNode("div",{class:["farris-nav-item",{active:y.id===f.value},{disabled:y.disable}],onClick:()=>m(y)},[e.createVNode("div",{class:"farris-nav-item-link"},[e.createVNode("span",{class:"farris-nav-item-link-text"},[y.text,y.num&&e.createVNode("div",{class:"farris-nav-item-tag"},[y.num<=t.maxNum&&e.createVNode("span",{class:"tag-text"},[y.num]),y.num>t.maxNum&&e.createVNode("span",{class:"tag-text"},[t.maxNum,e.createTextVNode("+")])])])])]))])}}}),Mu={install(t){t.component(Zr.name,Zr)},register(t,n,o){t.nav=Zr,n.nav=Iu},registerDesigner(t,n,o){t.nav=$1,n.nav=Iu}};function E1(t,n,o){return n}const B1=new Map([["appearance",ge]]),F1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/number-range.schema.json",title:"number-range",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a number-range",type:"string"},type:{description:"The type string of number-range component",type:"string",default:"number-range"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},I1={title:"number-range",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Kr={id:String,autoDecimal:{type:Boolean,default:!0},beginPlaceHolder:{type:String,default:"请输入开始数字"},beginValue:{type:[Number,String],default:"0"},bigNumber:{type:Boolean,default:!1},canNull:{type:Boolean,default:!1},decimalSeparator:{type:String,default:"."},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},endPlaceHolder:{type:String,default:"请输入结束数字"},endValue:{type:[Number,String],default:"0"},formatter:{type:Function},groupSeparator:{type:String,default:","},groupSize:{type:Number,default:3},max:{type:[Number,String]},min:{type:[Number,String]},parser:{type:Function},placeholder:{type:String,default:"请输入数字"},precision:{type:Number,default:0},prefix:{type:String,default:""},readonly:{type:Boolean,default:!1},separator:{type:String,default:"~"},showButton:{type:Boolean,default:!0},showZero:{type:Boolean,default:!0},step:{type:Number,default:1},suffix:{type:String,default:""},textAlign:{type:String,default:"left"},useThousands:{type:Boolean,default:!0}},Ou=me(Kr,F1,B1,E1,I1);function Pu(t,n){const o=e.computed(()=>Number(t.precision)||0);function a(p){return p.toFixed(o.value)}function r(p){return isNaN(p)||p===null||p===void 0||p===""}function i(p){const c=r(t.max)?null:new Se(String(t.max),10),f=r(t.min)?null:new Se(String(t.min),10);return c&&p.gt(c)?c:f&&p.lt(f)?f:p}function s(p,c,f,u){const d=new Se(p,10),m=r(f&&f.value)?null:new Se(String(f.value),10),g=r(c&&c.value)?null:new Se(String(c.value),10);let h;return u?h=m&&d.gt(m)?m:d:h=g&&d.lt(g)?g:d,h.toString()}function l(p){if(t.parser)return isNaN(Number(p))?t.parser(p):p;let c=i(new Se(p,10));if(c.isNaN()){if(t.canNull)return null;const u=new Se(""+t.min,10),d=new Se(""+t.max,10);if(!u.isNaN())c=u;else if(!d.isNaN())c=d;else return 0}return a(c)}return{getRealValue:l,isEmpty:r,precision:o,getValidNumberObject:i,getValidNumberInRange:s}}function _u(t,n,o){const a=e.computed(()=>({prefix:t.prefix,suffix:t.suffix,decimalSeparator:t.decimalSeparator,groupSeparator:t.useThousands?t.groupSeparator:"",groupSize:t.groupSize})),{getValidNumberObject:r,precision:i}=o;function s(c){return c=c==null||c===""?"":String(c),c=c.replace(new RegExp(t.prefix,"g"),"").replace(new RegExp(t.suffix,"g"),"").replace(/,/g,""),t.groupSeparator&&t.groupSeparator!==","&&(c=c.replace(new RegExp(`\\${t.groupSeparator}`,"g"),"")),t.decimalSeparator&&t.decimalSeparator!=="."&&(c=c.replace(new RegExp(`\\${t.decimalSeparator}`,"g"),".")),c}function l(c,f){return t.precision!==null&&t.precision!==void 0?c.toFormat(i.value,f):c.toFormat(f)}function p(c){const f=s(c),u=new Se(f,10),d=r(u);return d.valueOf()==="0"&&!t.showZero||d.isNaN()?"":t.formatter?t.formatter(d.toNumber()):l(d,a.value)}return{cleanFormat:s,format:p}}function Mo(t,n,o,a,r,i,s,l,p,c){const{format:f}=r,{getRealValue:u,getValidNumberInRange:d}=i;function m(){const C=new Se(a.value||0);return!(t.max&&!new Se(t.max).isNaN()&&C.gte(new Se(t.max)))}function g(){const C=new Se(a.value||0);return!(t.min&&!new Se(t.min).isNaN()&&C.lte(new Se(t.min)))}function h(C){if(t.readonly||t.disabled)return;const w=C==="up"?m:g,V=C==="up"?"plus":"minus";if(w()){let D=new Se(a.value||0)[V](Number(t.step)).toFixed();D=d(D,l,p,c),o.value=f(D),a.value=u(D),s(a.value)}}function y(){h("up")}function v(){h("down")}function b(C){y(),C.stopPropagation()}function x(C){v(),C.stopPropagation()}return{canDownward:g,canUpward:m,downward:v,onClickDownButton:x,onClickUpButton:b,upward:y}}function Oo(t,n,o,a,r,i,s,l,p,c,f){const{cleanFormat:u,format:d}=r,{getRealValue:m,isEmpty:g,getValidNumberInRange:h}=i,{downward:y,upward:v}=s,b=e.computed(()=>o.value),x=e.ref(!1);function C(S){var A;if(S.stopPropagation(),t.readonly||t.disabled)return;x.value=!1;let D=(A=S.target)==null?void 0:A.value;t.canNull||(D=D||0);let k=u(D);k=h(k,p,c,f),o.value=d(k),a.value=m(k),l(a.value),n.emit("blur",{event:S,formatted:o.value,value:a.value})}function w(S){S.stopPropagation(),!(t.readonly||t.disabled)&&(x.value=!0,o.value=g(a.value)||!t.showZero&&a.value==="0"?"":String(a.value),n.emit("focus",{event:S,formatted:o.value,value:a.value}))}function V(S){var A;S.stopPropagation();let D=(A=S.target)==null?void 0:A.value;t.canNull||(D=D||0);const k=u(D);o.value=k,a.value=m(k),l(a.value)}function N(S){S.key==="ArrowDown"&&(S.preventDefault(),y()),S.key==="ArrowUp"&&(S.preventDefault(),v()),S.stopPropagation()}return{textBoxValue:b,onBlurTextBox:C,onFocusTextBox:w,onInput:V,onKeyDown:N,isTextBoxFocused:x}}function Po(t,n,o,a){const{onBlurTextBox:r,onFocusTextBox:i,onInput:s,onKeyDown:l,textBoxValue:p}=o,c=e.computed(()=>t.disabled||t.readonly||!t.editable?"":a?t.beginPlaceHolder:t.endPlaceHolder),f=e.computed(()=>({"form-control":!0,"sub-input":!0})),u=e.computed(()=>({"text-align":t.textAlign}));function d(m){m.stopPropagation()}return()=>e.createVNode("input",{class:f.value,style:u.value,type:"text",value:p.value,disabled:t.disabled,readonly:t.readonly||!t.editable,placeholder:c.value,onBlur:r,onChange:d,onFocus:i,onInput:s,onKeydown:l},null)}function _o(t,n,o){const{canDownward:a,canUpward:r,onClickDownButton:i,onClickUpButton:s}=o,l=e.computed(()=>({"input-group-append":!0,"btn-group":!0,"btn-group-number":!0,"sub-btn-group":!0})),p=e.computed(()=>({btn:!0,"btn-secondary":!0,"btn-number-flag":!0})),c=e.computed(()=>({cursor:r()?"pointer":"not-allowed","margin-left":0})),f=e.computed(()=>({cursor:a()?"pointer":"not-allowed","margin-left":0}));return()=>e.createVNode("div",{class:l.value},[e.createVNode("button",{title:"upButton",class:p.value,style:c.value,onClick:s,disabled:!r()},[e.createVNode("span",{class:"f-icon f-icon-arrow-chevron-up number-arrow-chevron"},null)]),e.createVNode("button",{title:"downButton",class:p.value,style:f.value,onClick:i,disabled:!a()},[e.createVNode("span",{class:"f-icon f-icon-arrow-chevron-down number-arrow-chevron"},null)])])}const Qr=e.defineComponent({name:"FNumberRange",props:Kr,emits:["valueChange","blur","focus","click","input","beginValueChange","endValueChange"],setup(t,n){const o=e.ref(t.beginValue),a=e.ref(""),r=e.ref(t.endValue),i=e.ref(""),s=Pu(t),l=_u(t,n,s),p=w=>{n.emit("beginValueChange",w)},c=Mo(t,n,a,o,l,s,p,o,r,!0),f=Oo(t,n,a,o,l,s,c,p,o,r,!0),u=_o(t,n,c),d=Po(t,n,f,!0),m=w=>{n.emit("endValueChange",w)},g=Mo(t,n,i,r,l,s,m,o,r,!1),h=Oo(t,n,i,r,l,s,g,m,o,r,!1),y=_o(t,n,g),v=Po(t,n,h,!1),{getRealValue:b}=s,{format:x}=l,C=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton);return e.onMounted(()=>{const w=b(t.beginValue),V=b(t.endValue);a.value=x(w),i.value=x(V)}),e.watch(()=>[t.beginValue],([w])=>{if(!f.isTextBoxFocused.value){const V=b(w);a.value=x(V)}}),e.watch(()=>[t.endValue],([w])=>{if(!h.isTextBoxFocused.value){const V=b(w);i.value=x(V)}}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{a.value=x(o.value),i.value=x(r.value)}),()=>e.createVNode("div",{class:"input-group number-range f-cmp-number-spinner"},[e.createVNode("div",{class:"form-control input-container"},[e.createVNode("div",{class:"sub-input-group"},[d(),C.value&&u()]),e.createVNode("span",{class:"spliter"},[e.createTextVNode("~")]),e.createVNode("div",{class:"sub-input-group"},[v(),C.value&&y()])])])}}),M1=e.defineComponent({name:"FNumberRangeDesign",props:Kr,emits:["valueChange","blur","focus","click","input","beginValueChange","endValueChange"],setup(t,n){var D;const o=e.ref(t.beginValue),a=e.ref(""),r=e.ref(t.endValue),i=e.ref(""),s=Pu(t),l=_u(t,n,s),p=k=>{n.emit("beginValueChange",k)},c=e.ref(),f=e.inject("design-item-context"),u=cn(f.schema,(D=f.parent)==null?void 0:D.schema),d=ye(c,f,u);e.onMounted(()=>{c.value.componentInstance=d}),n.expose(d.value);const m=Mo(t,n,a,o,l,s,p,o,r,!0),g=Oo(t,n,a,o,l,s,m,p,o,r,!0),h=_o(t,n,m),y=Po(t,n,g,!0),v=k=>{n.emit("endValueChange",k)},b=Mo(t,n,i,r,l,s,v,o,r,!1),x=Oo(t,n,i,r,l,s,b,v,o,r,!1),C=_o(t,n,b),w=Po(t,n,x,!1),{getRealValue:V}=s,{format:N}=l,S=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton);return e.onMounted(()=>{const k=V(t.beginValue),A=V(t.endValue);a.value=N(k),i.value=N(A)}),e.watch(()=>[t.beginValue],([k])=>{const A=V(k);a.value=N(A)}),e.watch(()=>[t.endValue],([k])=>{const A=V(k);i.value=N(A)}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{a.value=N(o.value),i.value=N(r.value)}),()=>e.createVNode("div",{ref:c,class:"input-group number-range f-cmp-number-spinner"},[e.createVNode("div",{class:"form-control input-container"},[e.createVNode("div",{class:"sub-input-group"},[y(),S.value&&h()]),e.createVNode("span",{class:"spliter"},[e.createTextVNode("~")]),e.createVNode("div",{class:"sub-input-group"},[w(),S.value&&C()])])])}}),Ru={install(t){t.component(Qr.name,Qr)},register(t,n,o){t["number-range"]=Qr,n["number-range"]=Ou},registerDesigner(t,n,o){t["number-range"]=M1,n["number-range"]=Ou}};function O1(t,n){function a(){return!0}function r(s,l){return{categoryId:"basic",categoryName:"基本信息",properties:[{propertyID:"id",propertyName:"标识",propertyType:"string",propertyValue:e.ref(""),description:"组件的id",readonly:()=>!0,visible:()=>!0,editor:{type:"input-group"}}]}}function i(s){const l=[],p=r();return l.push(p),l}return{canAccepts:a,getPropConfig:i}}const P1=e.defineComponent({name:"FNumberSpinnerDesign",props:da,emits:["update:modelValue","valueChange","change","blur","focus","click","input"],setup(t,n){var v;const o=ml(t,n),a=pl(t,n,o),r=fl(t,n,a,o),i=hl(t,n,a,o,r),s=gl(t,n,r),l=yl(t,n,i),{displayValue:p,modelValue:c,getRealValue:f}=o,{format:u}=a,d=e.computed(()=>!t.disabled&&!t.readonly&&t.showButton),m=e.ref(),g=e.inject("design-item-context"),h=O1(g.schema,(v=g.parent)==null?void 0:v.schema),y=ye(m,g,h);return e.onMounted(()=>{m.value.componentInstance=y}),n.expose(y.value),e.onMounted(()=>{const b=f(t.modelValue);p.value=u(b)}),e.watch(()=>[t.value],([b])=>{const x=f(b);c.value=x,p.value=u(x)}),e.watch(()=>[t.precision,t.useThousands,t.prefix,t.suffix,t.showZero],()=>{p.value=u(c.value)}),()=>e.createVNode("div",{ref:m,class:"input-group f-state-hover flex-row f-cmp-number-spinner"},[l(),d.value&&s()])}}),Lu={install(t){t.component(Bt.name,Bt)},register(t,n,o){t["number-spinner"]=Bt,n["number-spinner"]=ul},registerDesigner(t,n,o){t["number-spinner"]=P1,n["number-spinner"]=ul}},_1=e.defineComponent({name:"FOrderDesign",props:wa,emits:["change"],setup(t,n){var C;const o=e.ref(t.items),a=e.ref("排序列"),r=e.ref("排序方式"),i=e.ref("添加排序列"),s=[{id:"asc",name:"升序"},{id:"desc",name:"降序"}],l=e.ref(new Map),p=e.ref(),c=e.inject("design-item-context"),f=cn(c.schema,(C=c.parent)==null?void 0:C.schema),u=ye(p,c,f);e.onMounted(()=>{p.value.componentInstance=u}),n.expose(u.value);function d(){const w=o.value.map(V=>[V.id,!0]);l.value=new Map(w)}d();const m=e.computed(()=>t.dataSource.map(w=>(w.disabled=l.value.has(w.id),w))),g=e.computed(()=>({"f-order":!0}));function h(w){o.value=o.value.filter(V=>V.id!==w.id),d(),n.emit("change",o.value)}function y(){o.value=[...o.value,{id:Date.now().toString(),name:"",order:"asc"}],d(),n.emit("change",o.value)}function v(w){d(),n.emit("change",o.value)}function b(w){if(w&&w.length){const V=new Map;w.reduce((N,S)=>(N.set(S.id,S),N),V),o.value=w.map(N=>V.get(N.id)),n.emit("change",o.value)}}function x(){return e.createVNode(Tt,{style:"flex:1",data:o.value,draggable:!0,view:"DraggableView","keep-order":!0,itemClass:"f-order-item",onRemoveItem:h,onChange:b},{header:()=>e.createVNode("div",{class:"f-order-header"},[e.createVNode("span",{class:"f-order-header-order-field"},[a.value]),e.createVNode("span",{class:"f-order-header-order-type"},[r.value])]),itemContent:w=>e.createVNode("div",{class:"f-order-item-content"},[e.createVNode(rt,{class:"f-order-item-content-order-field",data:m.value,valueField:"id",textField:"name",idField:"id",modelValue:w.id,"onUpdate:modelValue":V=>w.id=V,onChange:v,onClear:v},null),e.createVNode(rt,{class:"f-order-item-content-order-type",data:s,valueField:"id",textField:"name",idField:"id",modelValue:w.order,"onUpdate:modelValue":V=>w.order=V,onChange:v},null)]),footer:()=>e.createVNode("div",{class:"f-order-footer"},[e.createVNode(to,{type:"link",class:"f-order-add-button",onClick:y},{default:()=>e.createVNode(e.Fragment,null,[e.createVNode("span",{class:"f-order-add-icon"},[e.createVNode("i",{class:"f-icon f-icon-add"},null)]),i.value])})])})}return()=>e.createVNode("div",{ref:p,class:g.value},[x()])}}),Hu={install(t){t.component(no.name,no)},register(t,n,o){t.order=no,n.order=Hl},registerDesigner(t,n,o){t.order=_1,n.order=Hl}},R1=new Map([["appearance",ge],["toolbar",th]]),L1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/page-header.schema.json",title:"page-header",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Page Header",type:"string"},type:{description:"The type string of Page Header component",type:"string",default:"page-header"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},showIcon:{description:"",type:"boolean",default:!0},icon:{description:"",type:"string",default:"f-icon-page-title-record"},iconClass:{description:"",type:"string",default:"f-text-orna-bill"},title:{description:"",type:"string",default:""},subTitle:{description:"",type:"string",default:""},toolbar:{description:"",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar"},alignment:{description:"The alignment of Response Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Response Toolbar.",type:"array",default:[]}}},buttonClass:{description:"",type:"string",default:""},titleContentClass:{description:"",type:"string",default:""},contentClass:{description:"",type:"string",default:""},downContentClass:{description:"",type:"string",default:""},showPagination:{description:"",type:"boolean",default:!1},prePaginationDisabled:{description:"",type:"boolean",default:!0},nextPaginationDisabled:{description:"",type:"boolean",default:!1}}},H1={title:"page-header",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{title:"类型",type:"enum",description:"The type of a component.",editor:{type:"combo-list",data:[]}},icon:{title:"图标",type:"string",description:"图标"},title:{title:"标题",type:"string",description:"标题"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}}}};function j1(t,n,o){return n.title="标题",n}const Xr={customClass:{type:String,default:""},showIcon:{type:Boolean,default:!0},icon:{type:String,default:"f-icon-page-title-record"},iconClass:{type:String,default:"f-text-orna-bill"},title:{type:String,default:""},subTitle:{type:String,default:""},buttonClass:{type:String,default:"col-6"},buttons:{type:Array,default:[]},titleContentClass:{type:String,default:""},contentClass:{type:String,default:""},downContentClass:{type:String,default:""},showPagination:{type:Boolean,default:!1},prePaginationDisabled:{type:Boolean,default:!0},nextPaginationDisabled:{type:Boolean,default:!1}},ju=me(Xr,L1,R1,j1,H1),Jr=e.defineComponent({name:"FPageHeader",props:Xr,emits:["Click","PrePaginationClick","NextPaginationClick"],setup(t,n){const o=e.ref(t.buttons),a=x=>{n.emit("Click",x)};function r(x,C){x&&C&&C.split(" ").reduce((V,N)=>(V[N]=!0,V),x)}const i=e.computed(()=>{const x={"f-page-header":!0};return r(x,t.customClass),x}),s=e.computed(()=>{const x={"f-title-icon":!0};return r(x,t.iconClass),x}),l=e.computed(()=>{const x={"f-icon":!0};return r(x,t.icon),x}),p=e.computed(()=>{const x={"f-title":!0};return r(x,t.titleContentClass),x}),c=e.computed(()=>{const x={"f-content":!0};return r(x,t.contentClass),x}),f=e.computed(()=>{const x={"f-content":!0};return r(x,t.downContentClass),x}),u=e.computed(()=>({"f-icon f-icon-arrow-w":!0,"f-state-disabled":t.prePaginationDisabled})),d=e.computed(()=>({"f-icon f-icon-arrow-e":!0,"f-state-disabled":t.nextPaginationDisabled}));function m(x){t.prePaginationDisabled||n.emit("PrePaginationClick",x)}function g(x){t.nextPaginationDisabled||n.emit("NextPaginationClick",x)}function h(){return n.slots.titleContent?e.createVNode("div",{class:p.value},[e.createTextVNode(" "),n.slots.titleContent()]):e.createVNode("div",{class:"f-title"},[t.showIcon&&t.icon?e.createVNode("span",{class:s.value},[e.createVNode("i",{class:l.value},null)]):"",e.createVNode("h4",{class:"f-title-text"},[t.title]),t.subTitle?e.createVNode("h5",{class:"f-title-subtitle"},[t.subTitle]):"",t.showPagination?e.createVNode("div",{class:"f-title-pagination"},[e.createVNode("span",{class:u.value,onClick:m},null),e.createVNode("span",{class:d.value,onClick:g},null)]):""])}function y(){return n.slots.content?e.createVNode("div",{class:c.value},[e.createTextVNode(" "),n.slots.content()]):""}function v(){if(t.buttons&&t.buttons.length>0)return e.createVNode(rn,{customClass:t.buttonClass,items:o.value,onClick:a},null)}function b(){return n.slots.downContent?e.createVNode("div",{class:f.value},[e.createTextVNode(" "),n.slots.downContent()]):""}return()=>e.createVNode("div",{class:i.value},[e.createVNode("nav",{class:"f-page-header-base"},[h(),y(),v()]),b()])}});function W1(t,n){function o(r){return!1}function a(){return!0}return{canAccepts:o,hideNestedPaddingInDesginerView:a}}function q1(t,n){const o=e.inject("design-item-context"),a=e.inject("toolbar-item-handler",()=>{});function r(){a&&a()}function i(A){const $={"dropdown-menu":!0};if(A.class){const T=A.menuClass.split(" ");T&&T.length&&T.reduce((E,B)=>(E[B]=!0,E),$)}return $}function s(A){const $={disabled:!A.enable,"dropdown-submenu":!0,"f-rt-dropdown":!0},T=A.dropdownClass.split(" ");return T&&T.length&&T.reduce((E,B)=>(E[B]=!0,E),$),$}function l(A){const $={disabled:!A.enable,"dropdown-item":!0,"f-rt-btn":!0,"position-relative":!0,"farris-component":!0},T=A.class.split(" ");return T&&T.length&&T.reduce((E,B)=>(E[B]=!0,E),$),$}let p;const c=new Map;function f(A,$,T){var B;((B=A.target)==null?void 0:B.id)===$.id&&A.stopPropagation();const E=T?T.id:"__top_item__";if($.children&&$.children.length&&($.expanded=!$.expanded,$.expanded?c.set(E,$):c.delete(E)),c.has(E)&&c.get(E)!==$){const I=c.get(E);I&&(I.expanded=!1)}}function u(A){A&&(A.stopPropagation(),A.preventDefault())}function d(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach($=>$.classList.remove("dgComponentFocused"));const A=document.getElementsByClassName("dgComponentSelected");Array.from(A).forEach($=>$.classList.remove("dgComponentSelected"))}function m(A){A.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function g(A){const{buttons:$=[]}=o.schema;let T=[];$.forEach(I=>{T=T.concat(I.children||[])});const E=T.findIndex(I=>I.id===A),B=E===-1?null:T[E];return{index:E,item:B}}function h(A){const{buttons:$=[]}=o.schema,T=$.findIndex(B=>B.id===A),E=T===-1?null:$[T];return{index:T,item:E}}function y(A){var E;o.schema;const{index:$,item:T}=g(A);(E=o==null?void 0:o.setupContext)==null||E.emit("selectionChange",T==null?void 0:T.type,T)}const v=function(A){const{componentType:$}=A,T=lt($,A),E=$.toLowerCase().replace("-","_");return T&&!T.id&&T.type===$&&(T.id=`${E}_${Math.random().toString().slice(2,6)}`),T},b=function(){const A={componentType:"response-toolbar-item",parentComponentInstance:n.value,targetPosition:-1};return v(A)};function x(A,$){u(A),d(),m(A),y($.id)}function C(A,$,T){u(A);const E=$.id,B=T&&T.id,{buttons:I=[]}=o.schema;if(!B)return;const{index:F}=h(B);if(F===-1)return;const{index:R}=g(E);R!==-1&&(I[F].children.splice(R,1),r())}function w(A,$,T){u(A);const E=T&&T.id,{buttons:B=[]}=o.schema;if(!E)return;const{index:I}=h(E);if(I===-1)return;const F=b(),R=Object.assign({},F,{text:$.text});B[I].children.push(R),r()}function V(A,$,T){u(A);const E=T&&T.id,{buttons:B=[]}=o.schema;if(!E)return;const{index:I}=h(E);if(I===-1)return;const F=b(),R=Object.assign({},F,{text:"按钮"});B[I].children.push(R),r()}function N(A,$){return e.createVNode("div",{class:"component-btn-group"},[e.createVNode("div",null,[e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeButton",style:"position:static;",onClick:T=>C(T,A,$)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"复制",ref:"copyButton",style:"position:static;",onClick:T=>w(T,A,$)},[e.createVNode("i",{class:"f-icon f-icon-yxs_copy"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增同级",ref:"appendSame",style:"width:85px!important;padding:0 5px;position:static;",onClick:T=>V(T,A,$)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle text-white mr-1"},null),e.createVNode("span",{style:"font-size:13px;margin:auto"},[e.createTextVNode("新增同级")])])])])}function S(A){return A.children.map($=>$.children&&$.children.length?e.createVNode("li",{class:s($),id:$.id,onClick:T=>$.enable&&f(T,$,A)},[e.createVNode("span",{id:$.id,class:l($),onMouseover:T=>$.enable&&f(T,$,A)},[$.text,e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right",style:"display: inline-block;float: right;line-height: 1.25rem;"},null)]),p($,$)]):e.createVNode("li",{class:l($),id:$.id,onClick:T=>x(T,$)},[N($,A),t.shouldShowIcon($)&&e.createVNode("i",{class:t.iconClass($)},null),$.text]))}function D(A,$,T){const E={display:A.expanded?"block":"none",position:"fixed",maxWidth:"300px",width:"auto",minWidth:"120px"},B=document.getElementsByTagName("body")[0].getClientRects()[0].width,I=$,F=I==null?void 0:I.getClientRects();if(I&&F&&F.length){const{top:R,width:O,left:W,right:M,height:_}=F[0],H=Math.ceil(_+R);E.top=`${H}px`,E.left=`${W}px`;const L=A.id+"_menu",G=$?$.querySelector("#"+L):null;if(G){E.display==="block"&&(G.style.display="block");const Y=G.getBoundingClientRect();if(T){E.top=`${R-6}px`;const z=Math.ceil(O+W);E.left=`${z}px`}B-W-O<Y.width&&(E.left=`${(T?W:M)-Y.width}px`)}}return E}p=function(A,$){var I,F;const T=e.getCurrentInstance(),E=$?$.id:A.id,B=(F=(I=T==null?void 0:T.exposed)==null?void 0:I.elementRef.value)==null?void 0:F.querySelector("#"+E);return e.createVNode("ul",{class:i(A),style:D(A,B,$),id:A.id+"_menu"},[S(A)])};function k(){c.forEach(A=>{A.expanded=!1}),c.clear()}return{renderDropdownMenu:p,clearAllDropDownMenu:k}}function z1(t,n,o){const a=e.ref(t.alignment),{renderDropdownMenu:r,clearAllDropDownMenu:i}=q1(n,o),s=e.inject("design-item-context"),l=e.inject("toolbar-item-handler",()=>{});function p(){l&&l()}function c(k){const A={"btn-group":!0,"f-rt-dropdown":!0,"f-btn-ml":a.value==="right","f-btn-mr":a.value==="left"},$=k.dropdownClass.split(" ");return $&&$.length&&$.reduce((T,E)=>(T[E]=!0,T),A),A}function f(k){const A={btn:!0,disabled:!k.enable,"position-relative":!0,"farris-component":!0,"f-rt-btn":!0,"btn-icontext":!!(k.icon&&k.icon.trim())};if(k.class){const $=k.class.split(" ");$&&$.length&&$.reduce((T,E)=>(T[E]=!0,T),A)}return A}function u(k){k&&(k.stopPropagation(),k.preventDefault())}function d(k,A){u(k);const $=A.expanded;document.body.click(),A.expanded=!$}const m=function(k){const{componentType:A}=k,$=lt(A,k),T=A.toLowerCase().replace("-","_");return $&&!$.id&&$.type===A&&($.id=`${T}_${Math.random().toString().slice(2,6)}`),$},g=function(){const k={componentType:"response-toolbar-item",parentComponentInstance:o.value,targetPosition:-1};return m(k)};function h(k){const A=s.schema.buttons||s.schema.contents,$=A==null?void 0:A.findIndex(E=>E.id===k),T=$===-1?null:A[$];return{index:$,toolbarItem:T}}function y(k,A){var F;const{index:$,toolbarItem:T}=h(A);if($===-1)return;const E=T.text||"按钮",B=g(),I=Object.assign({},B,{text:E});(F=s.schema.buttons)==null||F.push(I),p()}function v(k,A){const{index:$,toolbarItem:T}=h(A);if($===-1)return;const E=T.text||"按钮",B=g(),I=Object.assign({},B,{text:E}),F=s.schema.buttons[$].children||[];F.push(I),s.schema.buttons[$].children=F,p()}function b(k,A){const $=s.schema.buttons||s.schema.contents,T=$==null?void 0:$.findIndex(E=>E.id===A);T!==-1&&($.splice(T,1),p())}function x(k){return e.createVNode("div",{class:"component-btn-group"},[e.createVNode("div",null,[e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeButton",style:"position:static;",onClick:A=>b(A,k)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"复制",ref:"copyButton",style:"position:static;",onClick:A=>y(A,k)},[e.createVNode("i",{class:"f-icon f-icon-yxs_copy"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增子级",ref:"appendChildButton",style:"width:85px!important;padding:0 5px;position:static;",onClick:A=>v(A,k)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle text-white mr-1"},null),e.createVNode("span",{style:"font-size:13px;margin:auto"},[e.createTextVNode("新增子级")])])])])}function C(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(A=>A.classList.remove("dgComponentFocused"));const k=document.getElementsByClassName("dgComponentSelected");Array.from(k).forEach(A=>A.classList.remove("dgComponentSelected"))}function w(k){k.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function V(k){var E;const A=s.schema.buttons||s.schema.contents,$=A==null?void 0:A.findIndex(B=>B.id===k);if($===-1)return;const T=A[$];(E=s==null?void 0:s.setupContext)==null||E.emit("selectionChange","response-toolbar-item",T)}function N(k,A){u(k),C(),w(k),u(k),d(k,A),V(A.id)}function S(k){return e.createVNode("div",{id:k.id,class:c(k)},[e.createVNode("div",{class:f(k),style:"display: flex;padding-right: 0.1rem;",onClick:A=>k.enable&&N(A,k)},[x(k.id),n.shouldShowIcon(k)&&e.createVNode("i",{class:n.iconClass(k)},null),e.createVNode("span",null,[k.text]),e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-down",style:"display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"},null)]),r(k)])}function D(){i()}return{renderToolbarDropdown:S,clearAllDropDown:D}}const{buildResponseToolbarItems:Wu}=ba(),ei=e.defineComponent({name:"FResponseToolbarDesign",props:ga,emits:["Click"],setup(t,n){const o=e.ref(Wu(t.items)),a=e.ref(),r=e.ref(),i=e.ref(t.alignment),s={id:"__more_buttons__",text:"More"},l=e.ref(new Nn(s)),p=Ol(),c=e.computed(()=>l.value.children.length>0),f=e.ref(),u=e.inject("design-item-context"),d=ye(f,u),m=e.inject("toolbar-item-handler",()=>{});e.onMounted(()=>{f.value.componentInstance=d}),n.expose(d.value);function g(){m&&m()}const h=e.computed(()=>({"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0})),y=e.computed(()=>({"d-flex":!0,"flex-nowrap":!0,"justify-content-end":i.value==="right","justify-content-start":i.value==="left"})),{renderToolbarDropdown:v,clearAllDropDown:b}=z1(t,p,d);function x(){o.value.filter(L=>L.children&&L.children.length>0).forEach(L=>{L.expanded=!1}),l.value.expanded=!1,b()}function C(L){const G={"f-icon":!0};if(L.icon){const Y=L.icon.trim().split(" ");Y&&Y.length&&Y.reduce((z,q)=>(z[q]=!0,z),G)}return G}function w(L){return!!(L.icon&&L.icon.trim())}function V(L){const G={btn:!0,"f-rt-btn":!0,"f-btn-ml":i.value==="right","f-btn-mr":i.value==="left","btn-icontext":!!(L.icon&&L.icon.trim())};if(L.class){const Y=L.class.split(" ");Y&&Y.length&&Y.reduce((z,q)=>(z[q]=!0,z),G)}return G}function N(L){L&&(L.stopPropagation(),L.preventDefault())}function S(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(G=>G.classList.remove("dgComponentFocused"));const L=document.getElementsByClassName("dgComponentSelected");Array.from(L).forEach(G=>G.classList.remove("dgComponentSelected"))}function D(L){L.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function k(L){var q;const G=u.schema.buttons||u.schema.contents,Y=G==null?void 0:G.findIndex(j=>j.id===L);if(Y===-1)return;const z=G[Y];(q=u==null?void 0:u.setupContext)==null||q.emit("selectionChange","response-toolbar-item",z)}const A=function(L){const{componentType:G}=L,Y=lt(G,L),z=G.toLowerCase().replace("-","_");return Y&&!Y.id&&Y.type===G&&(Y.id=`${z}_${Math.random().toString().slice(2,6)}`),Y},$=function(){const L={componentType:"response-toolbar-item",parentComponentInstance:d.value,targetPosition:-1};return A(L)};function T(L,G){S(),D(L),N(L),k(G)}function E(L,G){const Y=u.schema.buttons||u.schema.contents,z=Y==null?void 0:Y.findIndex(q=>q.id===G);z!==-1&&(Y.splice(z,1),g())}function B(L){const G=u.schema.buttons||u.schema.contents,Y=G==null?void 0:G.findIndex(q=>q.id===L),z=Y===-1?null:G[Y];return{index:Y,toolbarItem:z}}function I(L,G){var U;const{index:Y,toolbarItem:z}=B(G);if(Y===-1)return;const q=z.text||"按钮",j=$(),Z=Object.assign({},j,{text:q});(U=u.schema.buttons)==null||U.push(Z),g()}function F(L,G){const{index:Y,toolbarItem:z}=B(G);if(Y===-1)return;const q=z.text||"按钮",j=$(),Z=Object.assign({},j,{text:q}),U=u.schema.buttons[Y].items||[];U.push(Z),u.schema.buttons[Y].children=U,g()}function R(L){return e.createVNode("div",{class:"component-btn-group"},[e.createVNode("div",null,[e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeButton",style:"position:static;",onClick:G=>E(G,L)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"复制",ref:"copyButton",style:"position:static;",onClick:G=>I(G,L)},[e.createVNode("i",{class:"f-icon f-icon-yxs_copy"},null)]),e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增子级",ref:"appendChildButton",style:"width:85px!important;padding:0 5px;position:static;",onClick:G=>F(G,L)},[e.createVNode("i",{class:"f-icon f-icon-plus-circle text-white mr-1"},null),e.createVNode("span",{style:"font-size:13px;margin:auto"},[e.createTextVNode("新增子级")])])])])}function O(L){return e.createVNode("div",{class:"farris-component position-relative",style:"display:inline-block!important;",onClick:G=>T(G,L.id)},[R(L.id),e.createVNode("button",{type:"button",class:V(L),id:L.id,disabled:!L.enable},[w(L)&&e.createVNode("i",{class:C(L)},null),L.text])])}const W=new Map,M=[];function _(L){const G=r.value;let Y=L;const z=Array.from(G.children),q=z[z.length-1].id==="__more_buttons__"?z[z.length-1]:null;if(q){const ie=q.computedStyleMap().get("margin-left"),de=q.computedStyleMap().get("margin-right"),ne=(ie?ie.value:0)+q.getBoundingClientRect().width+(de?de.value:0);Y-=ne}const j=z.filter(ie=>ie.id!=="__more_buttons__");for(const ie of j){const de=ie.computedStyleMap().get("margin-left"),ne=ie.computedStyleMap().get("margin-right"),oe=(de?de.value:0)+ie.getBoundingClientRect().width+(ne?ne.value:0);Y<oe?(W.set(ie.id,!0),M.push({id:ie.id,width:oe})):Y-=oe}if(M.length)for(let ie=M.length-1;ie>=0;ie--){const de=M[ie].width;if(Y>=de)Y-=de,W.delete(M[ie].id),M.pop();else break}const Z=Object.assign({},l.value);Z.children=[];const U=new Nn(Z),X=o.value.reduce((ie,de)=>(W.has(de.id)&&U.children.push(de),de.visible=!W.has(de.id),ie.push(de),ie),[]);l.value=U,o.value=X}const H=new ResizeObserver(L=>{if(L.length){const Y=L[0].contentRect.width,q=r.value.getBoundingClientRect().width;(Y<q||M.length)&&_(Y)}});return e.onMounted(()=>{const L=a.value;H.observe(L),document.body.addEventListener("click",x)}),e.onUnmounted(()=>{H.disconnect(),document.body.removeEventListener("click",x)}),e.watch(()=>t.items,()=>{o.value=Wu(t.items)}),()=>e.createVNode("div",{ref:f,class:h.value},[e.createVNode("div",{ref:a,class:y.value},[e.createVNode("div",{ref:r,class:"d-inline-block f-response-content",style:"white-space: nowrap;"},[o.value.filter(L=>L.visible).map(L=>L.children&&L.children.length>0?v(L):O(L)),c.value&&v(l.value)])])])}}),qu=ya,zu={install(t){t.component(rn.name,rn)},register(t,n,o){t["response-toolbar"]=rn,n["response-toolbar"]=ya},registerDesigner(t,n,o){t["response-toolbar"]=ei,n["response-toolbar"]=ya}},G1={id:{type:String,default:""},canAdd:{type:Boolean,default:!1},canDelete:{type:Boolean,default:!1},canMove:{type:Boolean,default:!1},contentKey:{type:String,default:"contents"},childLabel:{type:String,default:""},childType:{type:String,default:""},modelValue:{type:Object}},ti=e.ref(0);function U1(t,n){const o=n.getBoundingClientRect(),a=t.getBoundingClientRect(),r=a.top>=o.top,i=a.top<=o.bottom;return r&&i}function Y1(t){if(!t)return;let n;if(t.className.includes("dgComponentSelected")?n=t:n=t.querySelector(".dgComponentSelected"),!n)return;const o=n.getBoundingClientRect();if(o.width===0&&o.height===0)return;const a=n.querySelector(".component-btn-group");if(a){if(!U1(n,t)){a.style.display="none";return}a.style.display="";const i=a.getBoundingClientRect(),s=a.querySelector("div");if(s){const l=s.getBoundingClientRect();s.style.top=i.top+"px",s.style.left=i.left-l.width+"px"}}}function Z1(t,n,o){var C;function a(){}const r="",i=e.ref();function s(){return!0}function l(){return!1}function p(){return!0}function c(){return!0}function f(w){if(!w||!w.value)return null;const V=e.ref(w==null?void 0:w.value.parent),N=f(V);return N||null}function u(w=n){const{componentInstance:V,designerItemElementRef:N}=w;return!V||!V.value?null:V.value.canMove?N:u(w.parent)}function d(w){return!!o}function m(){return(n==null?void 0:n.schema.label)||(n==null?void 0:n.schema.title)||(n==null?void 0:n.schema.name)}function g(){}function h(w,V){}function y(w){const{componentType:V}=w;let N=lt(V,w);const S=V.toLowerCase().replace("-","_");return N&&!N.id&&N.type===V&&(N.id=`${S}_${Math.random().toString().slice(2,6)}`),N}function v(w,V){const N=String(w.getAttribute("data-controltype")),S=w.getAttribute("data-feature"),D=S?JSON.parse(S):{};D.parentComponentInstance=i.value;let k=lt(N,D);const A=N.toLowerCase().replace("-","_");return k&&!k.id&&k.type===N&&(k.id=`${A}_${Math.random().toString().slice(2,6)}`),k}function b(w){}function x(){return[]}return i.value={canMove:s(),canSelectParent:l(),canDelete:p(),canNested:!c(),contents:[],elementRef:t,parent:(C=n.parent)==null?void 0:C.componentInstance,schema:n.schema,styles:r,canAccepts:d,getBelongedComponentInstance:f,getDraggableDesignItemElement:u,getDraggingDisplayText:m,getPropConfig:x,getDragScopeElement:g,onAcceptMovedChildElement:h,onAcceptNewChildElement:v,onChildElementMovedOut:b,addNewChildComponentSchema:y,updateDragAndDropRules:a,triggerBelongedComponentToMoveWhenMoved:e.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:e.ref(!1)},i}const Gu=e.defineComponent({name:"FDesignerInnerItem",props:G1,emits:["selectionChange","addComponent"],setup(t,n){const o=e.ref(t.canMove),a=e.ref(t.canAdd),r=e.ref(t.canDelete),i=e.ref(!1),s=e.ref(t.contentKey),l=e.ref(t.childType),p=e.ref(t.childLabel),c=e.ref(t.modelValue),f=e.ref(""),u=e.ref(),d=e.inject("canvas-dragula"),m=e.ref(),g=e.inject("design-item-context"),h={designerItemElementRef:u,componentInstance:m,schema:c.value,parent:g,setupContext:n};e.provide("design-item-context",h);const y=e.computed(()=>({"farris-component":!0,"position-relative":o.value&&r.value,"farris-nested":i.value,"can-move":o.value,"d-none":u.value&&u.value.classList.contains("d-none")})),v=e.computed(()=>{const A={};return f.value&&f.value.split(";").reduce(($,T)=>{const[E,B]=T.split(":");return E&&($[E]=B),$},A),A});function b(A,$){if(g&&g.schema[s.value]){const T=g.schema[s.value].findIndex(E=>E.id===$.id);g.schema[s.value].splice(T,1),g.componentInstance.value.updateDragAndDropRules()}}function x(A){if(m.value.addNewChildComponentSchema){const $={componentType:l.value,label:p.value,parentComponentInstance:m.value,targetPosition:-1},T=m.value.addNewChildComponentSchema($);c.value[s.value].push(T),n.emit("addComponent")}}function C(){return a.value&&e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增",ref:"removeComponent",onClick:A=>{x()}},[e.createVNode("i",{class:"f-icon f-icon-plus-circle"},null)])}function w(A){return r.value&&e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:$=>{b($,A)}},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function V(A){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[C(),w(A)])])}e.watch(()=>t.modelValue,A=>{c.value=A,h.schema=A});function N(A){const $=A.target;Y1($)}function S(){var A,$;($=(A=c.value)==null?void 0:A.contents)!=null&&$.length&&u.value&&u.value.addEventListener("scroll",N)}function D(){const A=u.value,$=e.ref(A.children[1]);return Z1($,h).value}e.onMounted(()=>{if(u.value){const A=u.value.querySelector(`[data-dragref='${c.value.id}-container']`);m.value=A&&A.componentInstance?A.componentInstance.value:D(),d&&A&&d.attachComponents(A,c.value),i.value=m.value.canNested!==void 0?m.value.canNested:i.value,o.value=m.value.canMove!==void 0?m.value.canMove:o.value,f.value=m.value.styles||"",u.value&&(u.value.componentInstance=m,u.value.designItemContext=h)}S(),ti.value++}),e.onBeforeUnmount(()=>{u.value&&u.value.removeEventListener("scroll",N)});function k(A){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(T=>T.classList.remove("dgComponentFocused")),A&&(A.preventDefault(),A.stopPropagation());const $=u.value;if($){const T=document.getElementsByClassName("dgComponentSelected");if(!(T&&T.length===1&&T[0]===u.value)){Array.from(T).forEach(I=>I.classList.remove("dgComponentSelected")),$.classList.add("dgComponentFocused"),n.emit("selectionChange",c.value.type,c.value);const B=m.value.getDraggableDesignItemElement(h);B&&B.value&&B.value.classList.add("dgComponentSelected")}}ti.value++}return()=>e.createVNode("div",{id:`${t.id}-design-item`,ref:u,class:y.value,style:v.value,onClick:k},[V(c.value),n.slots.default&&n.slots.default()])}}),K1={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},Uu=e.defineComponent({name:"FDesignerTemplateItem",props:K1,emits:["selectionChange"],setup(t,n){const o=e.ref(),a=e.computed(()=>({"farris-component":!0}));function r(i){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(l=>l.classList.remove("dgComponentFocused")),i&&(i.preventDefault(),i.stopPropagation());const s=o.value;if(s){const l=document.getElementsByClassName("dgComponentSelected");l&&l.length===1&&l[0]===o.value||(Array.from(l).forEach(c=>c.classList.remove("dgComponentSelected")),s.classList.add("dgComponentFocused"))}ti.value++}return()=>e.createVNode("div",{id:`${t.id}-design-item`,ref:o,class:a.value,onClick:r},[n.slots.default&&n.slots.default()])}}),Q1=e.defineComponent({name:"FPageHeaderDesign",props:Xr,emits:["Click"],setup(t,n){var f;const o=e.ref(),a=e.inject("design-item-context"),r=W1(a.schema,(f=a.parent)==null?void 0:f.schema),i=ye(o,a,r),s=e.ref(a.schema.toolbar||{type:"response-toolbar",buttons:[]}),l=e.ref(qu(s.value));e.onMounted(()=>{o.value.componentInstance=i}),e.watch(()=>a.schema.toolbar,()=>{s.value=a.schema.toolbar||{type:"response-toolbar",buttons:[]},l.value=qu(s.value)},{deep:!0});const p=e.computed(()=>[...l.value.items]);function c(u,d){a&&a.setupContext&&a.setupContext.emit("selectionChange",u,d)}return n.expose(i.value),()=>e.createVNode("div",{ref:o},[e.createVNode("nav",{class:"f-page-header-base"},[e.createVNode("div",{class:"f-title"},[e.createVNode(Uu,null,{default:()=>[e.createVNode("span",{class:"f-title-icon f-text-orna-manage"},[e.createVNode("i",{class:t.icon},null)])]}),e.createVNode(Uu,null,{default:()=>[e.createVNode("h4",{class:"f-title-text"},[t.title])]})]),e.createVNode(Gu,{class:"col-5",modelValue:s.value,"onUpdate:modelValue":u=>s.value=u,canAdd:!0,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",onSelectionChange:c},{default:()=>[e.createVNode(ei,{items:p.value},null)]})])])}}),Yu={install(t){t.component(Jr.name,Jr)},register(t,n,o){t["page-header"]=Jr,n["page-header"]=ju},registerDesigner(t,n,o){t["page-header"]=Q1,n["page-header"]=ju}},X1=new Map([["appearance",ge]]),J1={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/page-footer.schema.json",title:"page-footer",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a page-footer",type:"string"},type:{description:"The type string of page-footer component",type:"string",default:"page-footer"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};function ew(t,n,o){return n}const tw={title:"page-footer",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},ni={customClass:{type:String,default:""},enableCollapse:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!0},collapsedText:{type:String,default:"More"},expandedText:{type:String,default:"More"},contentClass:{type:String,default:""},headerClass:{type:String,default:""},headerContentClass:{type:String,default:""},headerToolbarClass:{type:String,default:""},showHeader:{type:String,default:!1}},Zu=me(ni,J1,X1,ew,tw),oi=e.defineComponent({name:"FPageFooter",props:ni,emits:[],setup(t,n){const o=e.ref(t.collapsed),a=e.computed(()=>t.collapsedText),r=e.ref(t.contentClass),i=e.computed(()=>t.enableCollapse),s=e.computed(()=>t.expandedText),l=e.ref(t.headerClass),p=e.ref(t.headerContentClass),c=e.ref(t.headerToolbarClass),f=e.computed(()=>t.showHeader),u=e.ref(t.customClass);function d(V){V&&V.stopImmediatePropagation(),o.value=!o.value}function m(){return i.value&&e.createVNode("div",{class:"toolbar--collapse",onClick:V=>d(V)},[e.createVNode("span",{class:"toobar--collapse-text"},[o.value?s.value:a.value]),e.createVNode("i",{class:"f-icon toolbar--collapse-icon"},null)])}const g=e.computed(()=>{const V={"f-toolbar":!0};return c.value.split(" ").reduce((S,D)=>(S[D]=!0,S),V),V});function h(){return e.createVNode("div",{class:g.value},[n.slots.headerToolbar&&n.slots.headerToolbar(),!n.slots.headerToolbar&&m()])}const y=e.computed(()=>{const V={"f-content":!0};return p.value.split(" ").reduce((S,D)=>(S[D]=!0,S),V),V});function v(){return e.createVNode(e.Fragment,null,[n.slots.headerContent&&e.createVNode("div",{class:y.value},[n.slots.headerContent()]),h()])}const b=e.computed(()=>{const V={"f-cmp-footer-header":!0};return l.value.split(" ").reduce((S,D)=>(S[D]=!0,S),V),V});function x(){return e.createVNode("header",{class:b.value},[n.slots.header&&n.slots.header(),!n.slots.header&&v()])}const C=e.computed(()=>{const V={"f-cmp-footer":!0,"f-state-collapse":i.value&&o.value,"f-cmp-footer-accordion":i.value};return u.value.split(" ").reduce((S,D)=>(S[D]=!0,S),V),V}),w=e.computed(()=>{const V={"f-cmp-footer-content":!0};return r.value.split(" ").reduce((S,D)=>(S[D]=!0,S),V),V});return()=>e.createVNode("div",{class:C.value},[e.createVNode("footer",{class:"f-cmp-footer-container"},[f.value&&x(),e.createVNode("div",{class:w.value},[n.slots.default&&n.slots.default()])])])}}),nw=e.defineComponent({name:"FPageFooterDesign",props:ni,emits:[],setup(t,n){var D;const o=e.ref(t.collapsed),a=e.ref(t.collapsedText),r=e.ref(t.contentClass),i=e.ref(t.enableCollapse),s=e.ref(t.expandedText),l=e.ref(t.headerClass),p=e.ref(t.headerContentClass),c=e.ref(t.headerToolbarClass),f=e.ref(t.showHeader),u=e.ref(),d=e.inject("design-item-context"),m=cn(d.schema,(D=d.parent)==null?void 0:D.schema),g=ye(u,d,m);e.onMounted(()=>{u.value.componentInstance=g}),n.expose(g.value);function h(k){k&&k.stopImmediatePropagation(),o.value=!o.value}function y(){return i.value&&e.createVNode("div",{class:"toolbar--collapse",onClick:k=>h(k)},[e.createVNode("span",{class:"toobar--collapse-text"},[o.value?s.value:a.value]),e.createVNode("i",{class:"f-icon toolbar--collapse-icon"},null)])}const v=e.computed(()=>{const k={"f-toolbar":!0};return c.value.split(" ").reduce(($,T)=>($[T]=!0,$),k),k});function b(){return e.createVNode("div",{class:v.value},[n.slots.headerToolbar&&n.slots.headerToolbar(),!n.slots.headerToolbar&&y()])}const x=e.computed(()=>{const k={"f-content":!0};return p.value.split(" ").reduce(($,T)=>($[T]=!0,$),k),k});function C(){return e.createVNode(e.Fragment,null,[n.slots.headerContent&&e.createVNode("div",{class:x.value},[n.slots.headerContent()]),b()])}const w=e.computed(()=>{const k={"f-cmp-footer-header":!0};return l.value.split(" ").reduce(($,T)=>($[T]=!0,$),k),k});function V(){return e.createVNode("header",{class:w.value},[n.slots.header&&n.slots.header(),!n.slots.header&&C()])}const N=e.computed(()=>{const k={"f-cmp-footer":!0,"f-state-collapse":i.value&&o.value,"f-cmp-footer-accordion":i.value};return l.value.split(" ").reduce(($,T)=>($[T]=!0,$),k),k}),S=e.computed(()=>{const k={"f-cmp-footer-content":!0};return r.value.split(" ").reduce(($,T)=>($[T]=!0,$),k),k});return()=>e.createVNode("div",{ref:u,class:N.value},[e.createVNode("footer",{class:"f-cmp-footer-container"},[f.value&&V(),e.createVNode("div",{class:S.value},[n.slots.default&&n.slots.default()])])])}}),Ku={install(t){t.component(oi.name,oi)},register(t,n,o){t["page-footer"]=oi,n["page-footer"]=Zu},registerDesigner(t,n,o){t["page-footer"]=nw,n["page-footer"]=Zu}},ow=new Map([["appearance",ge]]),aw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/pagination.schema.json",title:"pagination",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a pagination",type:"string"},type:{description:"The type string of pagination component",type:"string",default:"pagination"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]},rw={title:"pagination",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}};function iw(t,n,o){return n}const ai={currentPage:{type:Number,default:1},mode:{type:String,default:"default"},pageSize:{type:Number,default:20},totalItems:{type:Number,default:0},showPageList:{type:Boolean,default:!0},showPageNumbers:{type:Boolean,default:!0},showRedirection:{type:Boolean,default:!0}},Qu=me(ai,aw,ow,iw,rw);function Xu(t,n){const o=e.ref("跳转至"),a=e.ref(""),r=e.ref(t.value);e.watch(r,(p,c)=>{p>=1&&p<=n.value?t.value=p:r.value=c}),e.watch(t,p=>{r.value!==p&&(r.value=p)});function i(p){r.value=p.target.valueAsNumber}function s(p){p.key==="Enter"&&(r.value=p.target.valueAsNumber)}function l(){return e.createVNode("li",{class:"page-goto-input d-flex flex-row",style:"padding-left: 10px; white-space: nowrap;"},[e.createVNode("span",{class:"pg-message-text"},[o.value]),e.createVNode("input",{type:"number",class:"form-control farris-gotopagenumber",value:r.value,min:"1",max:n.value,style:"display: inline-block;margin-left:3px;",onBlur:p=>i(p),onKeyup:p=>s(p)},null),a.value])}return{renderGotoButton:l}}function Ju(t,n,o){const a=e.computed(()=>({"page-item":!0,disabled:n.value}));function r(p){t.value=t.value<o.value?t.value+1:o.value}function i(p){t.value=o.value}function s(){return e.createVNode("li",{class:a.value},[!n.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:p=>r()},[e.createVNode("span",{class:"f-icon f-page-next"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-next"},null)])])}function l(){return e.createVNode("li",{class:a.value},[!n.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:p=>i()},[e.createVNode("span",{class:"f-icon f-page-last"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-last"},null)])])}return{renderLastPage:l,renderNextPage:s}}function ef(t,n){const o=e.ref("共"),a=e.ref("条"),r=e.computed(()=>({"pagination-message":!0,"text-truncate":!0,"d-flex":!0,"ml-auto":t.value==="right","flex-fill":t.value==="right"}));function i(){return e.createVNode("li",{class:r.value},[e.createVNode("div",{class:"text-truncate",style:"line-height: 26px"},[e.createVNode("span",{class:"pg-message-text"},[o.value]),e.createVNode("b",{class:"pg-message-total"},[n.value]),e.createVNode("span",{class:"pg-message-text"},[a.value])])])}return{renderPageInfo:i}}function tf(t,n,o,a){const r=e.ref(!1),i=e.ref("显示"),s=e.ref("条"),l=e.computed(()=>({dropup:!0,"dropdown-right":!0,"pg-pagelist":!0,"pagelist-disabled":a.value===0,show:r.value})),p=e.computed(()=>({"dropdown-menu":!0,show:r.value})),c=h=>({"dropdown-item":!0,active:n.value===h});function f(h){r.value=!0}function u(h){r.value=!1}function d(h,y,v){const x=h*y-y+1;return Math.ceil(x/v)}function m(h,y){t.value=d(t.value,n.value,y),n.value=y,r.value=!1}function g(){return e.createVNode("li",{class:"pagination-pagelist"},[e.createVNode("div",{class:l.value,onMouseenter:h=>f(),onMouseleave:h=>u()},[e.createVNode("div",{class:"pg-pagelist-info"},[e.createVNode("span",{class:"pagelist-text"},[i.value]),e.createVNode("b",{class:"cur-pagesize"},[n.value]),e.createVNode("span",{class:"pagelist-text"},[s.value]),e.createVNode("i",{class:"f-icon f-icon-dropdown"},null)]),e.createVNode("div",{class:p.value,style:"margin-bottom: -1px;"},[o.value.map(h=>e.createVNode("li",{class:c(h),onClick:y=>m(y,h)},[e.createVNode("span",null,[h])]))])])])}return{renderPageList:g}}function nf(t,n){const o=s=>({"page-item":!0,current:t.value===s.value,ellipsis:s.label==="..."}),a=s=>({"f-icon":!0,"f-icon-arrow-seek-left":s.value<t.value,"f-icon-arrow-seek-right":s.value>t.value});function r(s,l){t.value=l}function i(){return n.value.map(s=>e.createVNode("li",{class:o(s)},[t.value!==s.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:l=>r(l,s.value)},[e.createVNode("span",{class:"page-link-label"},[s.label]),s.label==="..."&&e.createVNode("i",{class:a(s)},null)]),t.value===s.value&&e.createVNode("span",{class:"page-link"},[s.label])]))}return{renderPageNumbers:i}}function of(t,n,o){const a=e.computed(()=>({"page-item":!0,disabled:n.value}));function r(p){t.value=1}function i(p){t.value=t.value>2?t.value-1:1}function s(){return e.createVNode("li",{class:a.value},[o.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:p=>r()},[e.createVNode("span",{class:"f-icon f-page-first"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-first"},null)])])}function l(){return e.createVNode("li",{class:a.value},[o.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:p=>i()},[e.createVNode("span",{class:"f-icon f-page-pre"},null)]),n.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-pre"},null)])])}return{renderFirstPage:s,renderPreviousPage:l}}function af(t){const n=e.ref([]);function o(r,i,s,l){const p=Math.ceil(s/2);return r===s?l:r===1?r:s<l?l-p<i?l-s+r:p<i?i-p+r:r:r}function a(r,i,s,l){const p=[],c=Math.ceil(s/i),f=Math.ceil(l/2),u=r<=f,d=c-f<r,m=!u&&!d,g=l<c;let h=1;for(;h<=c&&h<=l;){const y=o(h,r,l,c),v=h===2&&(m||d),b=h===l-1&&(m||u),x=g&&(v||b)?"...":""+y;p.push({label:x,value:y}),h++}n.value=p}return{pages:n,updatePages:a}}const Ro=e.defineComponent({name:"FPagination",props:ai,emits:["pageIndexChanged","pageSizeChanged"],setup(t,n){const o=e.ref(!1),a=e.ref(t.mode),r=e.ref(""),i=e.ref(!1),s=e.ref(t.pageSize),l=e.ref(t.currentPage),p=e.ref(t.totalItems),{pages:c,updatePages:f}=af(),u=e.computed(()=>l.value===1),d=e.computed(()=>[20,50,100]),m=e.computed(()=>Math.ceil(p.value/s.value)),g=e.computed(()=>l.value===m.value),h=e.computed(()=>t.showGoButton),y=e.computed(()=>l.value>1),v=e.computed(()=>!(i.value&&c.value.length<=1)),b=e.computed(()=>!0),x=e.computed(()=>t.showPageList),C=e.computed(()=>t.showPageNumbers),w=e.computed(()=>!0),{renderFirstPage:V,renderPreviousPage:N}=of(l,u,y),{renderLastPage:S,renderNextPage:D}=Ju(l,g,m),{renderPageInfo:k}=ef(r,p),{renderPageList:A}=tf(l,s,d,p),{renderPageNumbers:$}=nf(l,c),{renderGotoButton:T}=Xu(l,m);f(l.value,s.value,p.value,7),e.watch([l,s],()=>{f(l.value,s.value,p.value,7)}),e.watch(l,()=>{n.emit("pageIndexChanged",l.value)}),e.watch(s,()=>{n.emit("pageSizeChanged",s.value)});const E=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:o.value,"pager-viewmode-default":a.value==="default","pager-viewmode-simple":a.value==="simple"})),B=e.computed(()=>({position:"relative","justify-content":r.value==="center"?"center":"start"}));function I(){return e.createVNode(e.Fragment,null,[b.value&&k(),x.value&&A(),w.value&&V(),w.value&&N(),C.value&&$(),w.value&&D(),w.value&&S(),h.value&&T()])}function F(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),w.value&&V(),w.value&&N(),T(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),m.value])]),w.value&&D(),w.value&&S()])}return()=>e.createVNode("div",{class:"pagination-container"},[v.value&&e.createVNode("ul",{role:"navigation",class:E.value,style:B.value},[a.value==="default"?I():F()])])}}),sw=e.defineComponent({name:"FPagination",props:ai,emits:["pageIndexChanged","pageSizeChanged"],setup(t,n){var _;const o=e.ref(!1),a=e.ref(t.mode),r=e.ref(""),i=e.ref(!1),s=e.ref(t.pageSize),l=e.ref(t.currentPage),p=e.ref(t.totalItems),c=e.ref(),f=e.inject("design-item-context"),u=cn(f.schema,(_=f.parent)==null?void 0:_.schema),d=ye(c,f,u);e.onMounted(()=>{c.value.componentInstance=d}),n.expose(d.value);const{pages:m,updatePages:g}=af(),h=e.computed(()=>l.value===1),y=e.computed(()=>[20,50,100]),v=e.computed(()=>Math.ceil(p.value/s.value)),b=e.computed(()=>l.value===v.value),x=e.computed(()=>!0),C=e.computed(()=>l.value>1),w=e.computed(()=>!(i.value&&m.value.length<=1)),V=e.computed(()=>!0),N=e.computed(()=>!0),S=e.computed(()=>!0),D=e.computed(()=>!0),{renderFirstPage:k,renderPreviousPage:A}=of(l,h,C),{renderLastPage:$,renderNextPage:T}=Ju(l,b,v),{renderPageInfo:E}=ef(r,p),{renderPageList:B}=tf(l,s,y,p),{renderPageNumbers:I}=nf(l,m),{renderGotoButton:F}=Xu(l,v);g(l.value,s.value,p.value,7),e.watch([l,s],()=>{g(l.value,s.value,p.value,7)}),e.watch(l,()=>{n.emit("pageIndexChanged",l.value)}),e.watch(s,()=>{n.emit("pageSizeChanged",s.value)});const R=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:o.value,"pager-viewmode-default":a.value==="default","pager-viewmode-simple":a.value==="simple"})),O=e.computed(()=>({position:"relative","justify-content":r.value==="center"?"center":"start"}));function W(){return e.createVNode(e.Fragment,null,[V.value&&E(),N.value&&B(),D.value&&k(),D.value&&A(),S.value&&I(),D.value&&T(),D.value&&$(),x.value&&F()])}function M(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),D.value&&k(),D.value&&A(),F(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),v.value])]),D.value&&T(),D.value&&$()])}return()=>e.createVNode("div",{ref:c,class:"pagination-container"},[w.value&&e.createVNode("ul",{role:"navigation",class:R.value,style:O.value},[a.value==="default"?W():M()])])}}),rf={install(t){t.component(Ro.name,Ro)},register(t,n,o){t.pagination=Ro,n.pagination=Qu},registerDesigner(t,n,o){t.pagination=sw,n.pagination=Qu}},lw=new Map([["appearance",ge]]);function cw(t,n,o){return n}const dw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/progress.schema.json",title:"progress",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for progress",type:"string"},type:{description:"The type string of progress",type:"string",default:"progress"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},uw={title:"progress",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},ri={progressType:{type:String,default:"line"},strokeWidth:{type:Number,default:0},size:{type:String,default:"default"},showInfo:{type:Boolean,default:!0},progressStatus:{type:String,default:"default"},successPercent:{type:Number,default:0},strokeColor:{type:String,default:""},strokeLinecap:{type:String,default:"round"},width:{type:Number,default:100},percent:{type:Number,default:20},enableBackgroundImg:{type:Boolean,default:!1},backgroundImg:{type:String,default:""},gapPosition:{type:String},gapDegree:{type:Number,default:0},format:{type:Function,default:(t,n)=>`${t}%`}},sf=me(ri,dw,lw,cw,uw);function fw(t){function n(s){return+s.replace("%","")}function o(s){let l=[];return Object.keys(s).forEach(p=>{const c=s[p],f=n(p);isNaN(f)||l.push({key:f,value:c})}),l=l.sort((p,c)=>p.key-c.key),l}const a=e.computed(()=>!!t.strokeColor&&typeof t.strokeColor!="string"),r=e.computed(()=>{const{from:s="#59a1ff",to:l="#59a1ff",direction:p="to right",...c}=t.strokeColor;if(Object.keys(c).length!==0){const f=o(c).map(({key:u,value:d})=>`${d} ${u}%`).join(", ");return`linear-gradient(${p}, ${f})`}return`linear-gradient(${p}, ${s}, ${l})`}),i=e.computed(()=>o(t.strokeColor).map(({key:s,value:l})=>({offset:`${s}%`,color:l})));return{isGradient:a,linearGradient:r,circleGradient:i}}function pw(t){return{strokeWidth:e.computed(()=>t.strokeWidth||(t.progressType==="line"&&t.size!=="small"?8:6))}}function mw(t){return{formatPercentageText:e.computed(()=>t.format(t.percent,t.successPercent))}}function hw(t,n,o,a){const{isCircleStyle:r}=n,{isGradient:i,linearGradient:s}=o,{strokeWidth:l}=a,p=e.computed(()=>{const v={"f-progress":!0,"f-progress-line":t.progressType==="line","ant-progress-small":t.size==="small","f-progress-show-info":t.showInfo,"f-progress-circle":r.value},b=`f-progress-status-${t.progressStatus}`;return v[b]=!0,v}),c=e.computed(()=>({width:`${t.width}px`,height:`${t.width}px`,"font-size":`${t.width*.15+6}px`,"f-progress-circle-gradient":i.value})),f=e.computed(()=>({"f-progress-inner":!0,"f-progress-circle-gradient":i.value})),u=0,d=e.computed(()=>u+1),m=e.computed(()=>{const v=50-l.value/2,b=t.gapPosition||(t.progressType==="circle"?"top":"bottom");let x=0,C=-v,w=0,V=v*-2;switch(b){case"left":x=-v,C=0,w=v*2,V=0;break;case"right":x=v,C=0,w=v*-2,V=0;break;case"bottom":C=v,V=v*2;break}return`M 50,50 m ${x},${C}
|
|
5
5
|
a ${v},${v} 0 1 1 ${w},${-V}
|
|
6
|
-
a ${v},${v} 0 1 1 ${-w},${V}`}),g=e.computed(()=>{const v=50-l.value/2,b=Math.PI*2*v,x=t.gapDegree||(t.progressType==="circle"?0:75);return{strokeDasharray:`${b-x}px ${b}px`,strokeDashoffset:`-${x/2}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"}}),h=e.computed(()=>{const v=50-l.value/2,b=Math.PI*2*v,x=t.gapDegree||(t.progressType==="circle"?0:75),C=t.successPercent!==void 0&&t.successPercent!==null?[t.successPercent,t.percent]:[t.percent];return C.map((w,V)=>{const N=C.length===2&&V===0;return{stroke:i.value&&!N?`url(#gradient-${d.value})`:null,strokePathStyle:{stroke:i.value?null:N?"default":t.strokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(w||0)/100*(b-x)}px ${b}px`,strokeDashoffset:`-${x/2}px`}}}).reverse()}),y=e.computed(()=>({width:`${t.percent}%`,"border-radius":t.strokeLinecap==="round"?"100px":"0",background:i.value?null:t.strokeColor,"background-image":i.value?s.value:null,height:`${l.value}px`}));return{progressClass:p,inCircleProgressBarStyle:c,inCircleProgressBarClass:f,pathString:m,trailPathStyle:g,progressCirclePaths:h,gradientId:d,inlineProgressBackgroundStyle:y}}function gw(t){return{isCircleStyle:e.computed(()=>t.progressType==="circle"||t.progressType==="dashboard")}}function yw(t){const n=e.computed(()=>{const r={"f-progress-text-icon":!0,"f-icon":!0},i=`f-icon-${t.progressStatus}`;return r[i]=!0,r}),o=e.computed(()=>{const r={"f-progress-text-icon":!0,"f-icon":!0},i=t.progressStatus==="success"?"f-icon-checkmark":"f-icon-x";return r[i]=!0,r}),a=e.computed(()=>t.progressStatus==="error"||t.progressStatus==="success");return{inlineProgrssStatusClass:n,circleProgrssStatusClass:o,shouldShowStatus:a}}function bw(t){const n=e.computed(()=>({width:`${t.successPercent}%`,"border-radius":t.strokeLinecap==="round"?"100px":"0",height:`${t.strokeWidth}px`,"background-image":t.enableBackgroundImg?`url(${t.backgroundImg})`:null})),o=e.computed(()=>t.successPercent||t.successPercent===0);return{inlineProgressSuccessBackgroundStyle:n,shouldShowSuccessInlineProgressBackground:o}}const Pn=e.defineComponent({name:"FProgress",props:ri,emits:[],setup(t){const n=e.ref(t.progressType),o=e.ref(t.showInfo),a=e.ref(t.percent),r=e.ref(t.strokeLinecap),i=fw(t),{isGradient:s,circleGradient:l}=i,p=pw(t),{strokeWidth:c}=p,{formatPercentageText:f}=mw(t),u=gw(t),{isCircleStyle:d}=u,{progressClass:m,inCircleProgressBarStyle:g,inCircleProgressBarClass:h,pathString:y,trailPathStyle:v,progressCirclePaths:b,gradientId:x,inlineProgressBackgroundStyle:C}=hw(t,u,i,p),{inlineProgrssStatusClass:w,circleProgrssStatusClass:V,shouldShowStatus:N}=yw(t),{inlineProgressSuccessBackgroundStyle:S,shouldShowSuccessInlineProgressBackground:D}=bw(t);e.watch(()=>t.percent,T=>{a.value=T||0});function k(){return o.value&&e.createVNode("span",{class:"f-progress-text"},[N.value?e.createVNode("span",{class:d.value?V.value:w.value},null):f.value])}function A(){return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-progress-outer"},[e.createVNode("div",{class:"f-progress-inner"},[e.createVNode("div",{class:"f-progress-bg",style:C.value},null),D.value&&e.createVNode("div",{class:"f-progress-success-bg",style:S.value},null)])]),k()])}function $(){return e.createVNode("div",{class:h.value,style:g.value},[e.createVNode("svg",{class:"f-progress-circle",viewBox:"0 0 100 100"},[s.value&&e.createVNode("defs",null,[e.createVNode("linearGradient",{id:"gradient-"+x.value,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[l.value.map(T=>e.createVNode("stop",{offset:T.offset,"stop-color":T.color},null))])]),e.createVNode("path",{class:"f-progress-circle-trail",stroke:"#efefef","fill-opacity":"0","stroke-width":c.value,d:y.value,style:v.value},null),b.value.map(T=>e.createVNode("path",{class:"f-progress-circle-path","fill-opacity":"0",d:y.value,"stroke-linecap":r.value,stroke:T.stroke,"stroke-width":a.value?c.value:0,style:T.strokePathStyle},null))]),k()])}return()=>e.createVNode("div",{class:m.value},[n.value==="line"&&A(),d.value&&$()])}}),vw=e.defineComponent({name:"FProgressDesign",props:ri,emits:[],setup(t,n){const o=e.ref(t.progressStatus),a=e.ref(t.progressType),r=e.ref(t.size),i=e.ref(t.showInfo),s=e.ref(t.strokeWidth),l=e.ref(t.percent),p=e.ref(t.strokeLinecap),c=e.ref(!1),f=e.ref(t.strokeColor),u=e.ref(null),d=e.ref(0),m=e.ref(t.width),g=e.ref(""),h=e.ref([]),y=e.ref(""),v=e.ref([]),b=e.ref(t.enableBackgroundImg),x=e.ref(t.backgroundImg),C=e.ref(),w=e.inject("design-item-context"),V=ye(C,w);e.onMounted(()=>{C.value.componentInstance=V}),n.expose(V.value),e.watch(()=>t.percent,F=>{l.value=F||0});const N=e.computed(()=>s.value||(a.value==="line"&&r.value!=="small"?8:6)),S=e.computed(()=>a.value==="circle"||a.value==="dashboard"),D=e.computed(()=>{const F={"f-progress":!0,"f-progress-line":a.value==="line","ant-progress-small":r.value==="small","f-progress-show-info":i.value,".f-progress-circle":S.value},R=`f-progress-status-${o.value}`;return F[R]=!0,F}),k=e.computed(()=>({width:`${l.value}%`,"border-radius":p.value==="round"?"100px":"0",backgroud:c.value?null:f.value,"background-image":c.value?u.value:null,height:`${N.value}px`})),A=e.computed(()=>({width:`${l.value}%`,"border-radius":p.value==="round"?"100px":"0",height:`${N.value}px`,"background-image":b.value?x.value:null})),$=e.computed(()=>d.value||d.value===0);function T(){return e.createVNode("div",{class:"f-progress-outer"},[e.createVNode("div",{class:"f-progress-inner"},[e.createVNode("div",{class:"f-progress-bg",style:k.value},null),$.value&&e.createVNode("div",{class:"f-progress-success-bg",style:A.value},null)])])}const E=e.computed(()=>({width:`${m.value}px`,height:`${m.value}px`,"font-size":`${m.value*.15+6}px`,"f-progress-circle-gradient":c.value})),B=e.computed(()=>({}));function I(){return e.createVNode("div",{class:"f-progress-inner",style:E.value},[e.createVNode("svg",{class:"f-progress-circle",viewBox:"0 0 100 100"},[c.value&&e.createVNode("defs",null,[e.createVNode("linearGradient",{id:"gradient-"+g.value,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[h.value.map(F=>e.createVNode("stop",{offset:F.offset,"stop-color":F.color},null))])]),e.createVNode("path",{class:"f-progress-circle-trail",stroke:"#efefef","fill-opacity":"0","stroke-width":N.value,d:y.value,style:B.value},null),v.value.map(F=>e.createVNode("path",{class:"f-progress-circle-path","fill-opacity":"0",d:y.value,"stroke-linecap":p.value,stroke:F.stroke,"stroke-width":l.value?N.value:0,style:F.strokePathStyle},null))])])}return()=>e.createVNode("div",{ref:C,class:D.value},[a.value==="line"&&T(),S.value&&I()])}}),lf={install(t){t.component(Pn.name,Pn)},register(t,n,o){t.progress=Pn,n.progress=sf},registerDesigner(t,n,o){t.progress=vw,n.progress=sf}};var ii=(t=>(t.Equal="0",t.NotEqual="1",t.Greater="2",t.GreaterOrEqual="3",t.Less="4",t.LessOrEqual="5",t.Like="6",t.LikeStartWith="7",t.LikeEndWith="8",t))(ii||{});const xw=[{value:"0",name:"等于"},{value:"1",name:"不等于"},{value:"2",name:"大于"},{value:"3",name:"大于等于"},{value:"4",name:"小于"},{value:"5",name:"小于等于"},{value:"6",name:"包含"},{value:"7",name:"开始是"},{value:"8",name:"结束是"}],Cw={"button-edit":["0","1"," 6","7","8"],"check-box":["0"],"combo-list":["0","1"],"combo-lookup":["0","1"," 6","7","8"],"date-picker":["0","1","2","3","4","5"],"date-range":[],"datetime-picker":["0","1","2","3","4","5"],"datetime-range":[],"month-picker":["0","1","2","3","4","5"],"month-range":[],"year-picker":["0","1","2","3","4","5"],"year-range":[],"input-group":["0","1","6","7","8"],lookup:["0","1"],"number-range":[],"number-spinner":["0"," 1","2","3","4","5"],"radio-group":["0"],text:["0","1"," 6","7","8"]};function ww(t,n,o){const{fieldMap:a}=o;function r(i){const s=a.get(i.fieldCode);if(!s)return[];const l=s.editor.type,p=new Set(Cw[l]);return xw.filter(f=>p.has(f.value))}return{getCompareOperators:r}}function cf(t,n){const o=e.ref(t.fields),a=e.ref([]),r=new Map,{createConditionValue:i}=Tr();function s(f){switch(f.editor?f.editor.type:"input-group"){case"date-range":f.editor.type="date-picker";break;case"datetime-range":f.editor.type="datetime-picker";break;case"number-range":f.editor.type="number-spinner";break}return f.editor}function l(f){return f.map(d=>Object.assign({},d)).map(d=>(d.editor=s(d),d))}function p(f=!0){o.value.reduce((u,d)=>(f||(d.editor=s(d)),u.set(d.labelCode,d),u),r)}function c(f){return f.forEach(u=>{if(u&&typeof u.valueConfig=="object"){const d=r.get(u.fieldCode);u.value=i(d.editor.type,u.valueConfig.content)}}),f}return{convertToSingleControl:l,fields:o,fieldMap:r,fieldConditions:a,loadFieldConfigs:p,initialConditionValue:c}}function Vw(t,n,o){const a=e.ref(null),r=e.ref(o),i=e.ref(0),s=e.computed(()=>c(i.value));function l(){r.value&&(a.value=new ResizeObserver(p(f=>{const u=f[0];i.value=u.contentRect.width})),a.value.observe(r.value))}function p(f,u){let d=null;return function(){const m=arguments;d||(d=setTimeout(()=>{d=null},500),f(...m))}}function c(f){let d="col-12";return f>250*6?d="col-2":f>250*4?d="col-3":f>250*3?d="col-4":f>250*2&&(d="col-6"),d}return e.watch([o],([f])=>{r.value=f,l()}),{conditionClass:s,resizeObserver:a}}const _n=e.defineComponent({name:"FConditionFields",props:jl,emits:["valueChange","blur","focus","click","input"],setup(t,n){const o=e.ref(),a=e.ref(t.key),r=e.ref(t.isControlInline),i=e.ref(t.conditions),s=cf(t),{initialConditionValue:l,fieldMap:p,loadFieldConfigs:c}=s,f=Vw(t,n,o),{conditionClass:u,resizeObserver:d}=f;c(!0),l(i.value),e.onBeforeUnmount(()=>{var v;(v=d.value)==null||v.unobserve(o.value)}),e.watch(()=>t.conditions,()=>{i.value=t.conditions});const m=e.computed(()=>({"f-utils-flex-row-wrap":!0,"farris-form":!0,"farris-form-controls-inline":r.value})),g=e.computed(()=>u.value);function h(v,b){n.emit("valueChange",v,b)}function y(){return i.value.map(v=>{var b;return e.createVNode(zt,{customClass:g.value,label:v.fieldName,editor:(b=p.get(v.fieldCode))==null?void 0:b.editor,modelValue:v.value.value,"onUpdate:modelValue":x=>v.value.value=x,onChange:x=>{h(x,v)}},null)})}return()=>e.createVNode("div",{class:m.value,key:a.value,ref:o},[y()])}});var si=(t=>(t[t.Value=0]="Value",t[t.SmartHelp=1]="SmartHelp",t[t.Enum=2]="Enum",t[t.Express=3]="Express",t))(si||{});function df(){const t=e.ref({relation:0,items:[],children:[],path:[],groupId:0,level:0}),n=new Map,o=new Map;let a=0;function r(){return{id:"",fieldCode:"",fieldName:"",compareType:ii.Equal,valueType:si.Value,value:new Xd,relation:0,conditionId:Date.now()}}function i(D,k){return{relation:D,items:[],children:[],path:[],groupId:++a,level:k}}function s(){const D=Object.assign({},t.value);o.forEach((k,A)=>{k.groupId===D.groupId&&o.set(A,D)}),n.forEach((k,A)=>{k.groupId===D.groupId&&n.set(A,D)}),t.value=D}function l(D){const k=new Map;let A=0;return D.forEach(($,T)=>{var E,B;if(A+=((E=$.lBracket)==null?void 0:E.length)||0,k.set(T,A),A-=((B=$.rBracket)==null?void 0:B.length)||0,A<0)throw new Error("The right bracket is out of range.")}),k}function p(D,k,A,$,T){for(let E=0;E<k;E++){const B=D+(E+1),I=i(T,B);A.children.push(I),o.set(I.groupId,A),A=A.children[A.children.length-1],$.push(A)}return A}function c(D,k,A,$,T){for(let F=k;F<=0;F++)$.pop();const E=$[$.length-1];if(!E)throw new Error("The group path is out of range");const B=D+k,I=i(T,B);return E.children.push(I),o.set(I.groupId,E),A=E.children[E.children.length-1],$.push(A),A}function f(D,k,A,$){A.pop();const T=A[A.length-1],E=i($,D);return T.children.push(E),o.set(E.groupId,T),k=T.children[T.children.length-1],A.push(k),k}function u(D,k,A,$,T,E){let B=D[D.length-1];if(!B)throw new Error("The group path is out of range");const I=k.get($)||0,F=k.get(A)||0;if(A<0||A===$)return D[D.length-1];const R=I-F,O=T&&T.relation!==void 0?T.relation:1;return B=R>0?p(F,R,B,D,O):B,B=R<0?c(F,R,B,D,O):B,B=R===0&&F>0&&I>0&&T&&E&&!!T.rBracket&&!!E.lBracket?f(F,B,D,O):B,B}function d(D){const A={relation:D.length&&D[0].relation!==void 0?D[0].relation:1,items:[],children:[],path:[],groupId:0,level:0},$=[A],T=l(D);return D.forEach((E,B)=>{const I=B-1,F=D[I],R=u($,T,I,B,F,E);R.items.push(E),n.set(E.conditionId,R)}),t.value=A,A}function m(){const D=r();n.set(D.conditionId,t.value),t.value.items.push(D)}function g(D){if(!D)return;const k=n.get(D.conditionId);if(k){const A=k.items.findIndex(T=>T.conditionId===D.conditionId)+1,$=r();n.set($.conditionId,k),k.items.splice(A,0,$),s()}}function h(D){const k=n.get(D.conditionId);k&&(k.items=k.items.filter(A=>A.conditionId!==D.conditionId),n.delete(D.conditionId),S(),s())}function y(D,k,A,$){D.reduce((T,E)=>{const B=E.conditionId!==void 0,I=E.groupId!==void 0;if(B){const F=E;A.push(F),T.items.set(F.conditionId,F)}if(I){const F=E;$.push(F),T.groups.set(F.groupId,F)}return T},k)}function v(D,k,A,$,T){D&&(D.items=k.length?D.items.filter(E=>!A.has(E.conditionId)):D.items,D.children=$.length?D.children.filter(E=>!T.has(E.groupId)):D.children)}function b(D,k,A){k.forEach($=>{D.items.push($),n.set($.conditionId,D)}),A.forEach($=>{D.children.push($),o.set($.groupId,D)})}function x(D){const k=D[0],A=k.conditionId!==void 0?n.get(k.conditionId):o.get(k.groupId),$={items:new Map,groups:new Map},T=[],E=[];if(A){y(D,$,T,E),v(A,T,$.items,E,$.groups);const B=i(A.relation,A.level+1);b(B,T,E),A.children.push(B),o.set(B.groupId,A),s()}}function C(D){const k=[...D.items],A=[...D.children],$=o.get(D.groupId);$&&($.children=$.children.filter(T=>T.groupId!==D.groupId),o.delete(D.groupId),k.forEach(T=>{$.items.push(T),n.set(T.conditionId,$)}),A.forEach(T=>{$.children.push(T),o.set(T.groupId,$)}),s())}function w(D){D.relation=D.relation===1?2:1,s()}let V;function N(D){const{relation:k}=D;return(D.children&&D.children.length?D.children.map(($,T,E)=>{const B=V($);return B[0].lBracket=(B[0].lBracket||"")+"(",B[B.length-1].rBracket=(B[B.length-1].rBracket||"")+")",B[B.length-1].relation=T<E.length-1?k:0,B}):[]).flat()}V=(D=t.value)=>{const{relation:k}=D,A=D.items.map((T,E,B)=>(T.lBracket=E===0?"(":"",T.rBracket=E===B.length-1?")":"",T.relation=E<B.length-1?k||1:0,T)),$=N(D);return[...A,...$]};function S(D){const k=D||t.value;if(k.children.length&&k.children.forEach(A=>{S(A)}),k.level===0&&!k.items.length&&k.children.length===1){const A=k.children[0];t.value.relation=A.relation,C(A)}else k.items.length===0&&k.children.length<=1&&C(k)}return{addCondition:m,changeGroupRelation:w,conditionGroupMap:n,getConditions:V,group:x,groupParentMap:o,insertConditionTo:g,loadConditionGroup:d,refresh:s,removeCondition:h,rootGroup:t,unGroup:C}}const Nw={install(t){t.component(_n.name,_n).component(Qo.name,Qo)}};function Sw(t,n){return{solutions:[{id:"default",code:"default",name:"默认筛选方案",conditions:n.map((r,i)=>{const{id:s,labelCode:l,name:p}=r,c=ii.Equal,f=si.Value;return{id:s,fieldCode:l,fieldName:p,compareType:c,valueType:f,value:{},conditionId:i}}),isPreset:!0,isDefault:!0,type:"",mode:"1"}]}}const Tw=new Map([["appearance",ge],["preset",Sw]]),Dw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution.schema.json",title:"query-solution",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a query solution",type:"string"},type:{description:"The type string of query solution component",type:"string",default:"query-solution"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},fields:{description:"",type:"array",default:[]},preset:{description:"",type:"array"},solutions:{description:"",type:"array"}}};function kw(t,n,o){return n}const Aw={title:"query-solution",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"},style:{description:"组件的内容样式",title:"style样式",type:"modal",showClearButton:!0},height:{description:"组件的高度",title:"高度(px)",type:"number",min:0,decimals:0}}},isControlInline:{description:"空间标签独占一行",type:"boolean",title:"空间标签独占一行"},filterText:{description:"筛选按钮文本",type:"string",title:"筛选按钮文本"},expanded:{description:"展开",type:"boolean",title:"展开",visible:{anyOf:[{isControlInline:{equal:!0}}]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{fields:{description:"筛选方案字段设置",title:"筛选方案字段",type:"",$converter:"",editor:{type:"query-solution-config"}}}}}},li={fields:{type:Array,default:[{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",labelCode:"id",code:"id",name:"标识",placeHolder:"",editor:{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",labelCode:"Version",code:"Version",name:"版本",placeHolder:"",editor:{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",type:"date-picker",require:!1,format:"yyyy-MM-dd",weekSelect:!1,startFieldCode:"Version",endFieldCode:"Version"}},{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",labelCode:"EmployeeID.EmployeeID",code:"EmployeeID",name:"创建人",placeHolder:"",editor:{type:"lookup",require:!1,uri:"",textField:"name",valueField:"id",idField:"id",helpId:"915a0b20-975a-4df1-8cfd-888c3dda0009",displayType:"List",loadTreeDataType:"default",enableFullTree:!1,editable:!1,mapFields:{code:"employeeID.employeeID_code",name:"employeeID.employeeID_name"},singleSelect:!0,pageSize:20,pageList:"10,20,30,50",expandLevel:-1,context:{enableExtendLoadMethod:!0}}},{id:"387679f1-4f61-40f3-8286-b3b55219a7aa",labelCode:"EmployeeID.EmployeeID_code",code:"code",name:"创建人工号",placeHolder:"",editor:{id:"387679f1-4f61-40f3-8286-b3b55219a7aa",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"f2878e6d-99a2-45e7-8678-3635b1e0ec2a",labelCode:"EmployeeID.EmployeeID_name",code:"name",name:"创建人",placeHolder:"",editor:{id:"f2878e6d-99a2-45e7-8678-3635b1e0ec2a",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",labelCode:"DomainID.DomainID",code:"DomainID",name:"业务部门",placeHolder:"",editor:{type:"lookup",require:!1,uri:"",textField:"name",valueField:"id",idField:"id",helpId:"b524a702-7323-4d46-998e-5ba0c6abcd49",displayType:"TreeList",loadTreeDataType:"default",enableFullTree:!1,editable:!1,dialogTitle:"",singleSelect:!0,enableCascade:!1,cascadeStatus:"enable",pageSize:20,pageList:"10,20,30,50",nosearch:!1,expandLevel:-1,context:{enableExtendLoadMethod:!0},quickSelect:{enable:!1,showMore:!0,showItemsCount:10}}},{id:"138082d4-9b07-4da2-9858-73861e0ac127",labelCode:"DomainID.DomainID_code",code:"code",name:"部门编号",placeHolder:"",editor:{id:"138082d4-9b07-4da2-9858-73861e0ac127",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"99587da0-8c9d-4efb-a196-f5762ba6000e",labelCode:"DomainID.DomainID_name",code:"name",name:"业务部门",placeHolder:"",editor:{id:"99587da0-8c9d-4efb-a196-f5762ba6000e",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",labelCode:"BillCode",code:"BillCode",name:"单据编号",placeHolder:"",editor:{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",tpye:"input-group",require:!1,editable:!0,groupText:"",usageMode:"text",modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]},groupTextUseLang:!0}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",labelCode:"TotalSum",code:"TotalSum",name:"订单金额",placeHolder:"",editor:{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",type:"number-spinner",require:!1,textAlign:"left",precision:2,isBigNumber:!1,maxValue:1e5,minValue:-1e5}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",labelCode:"BillType",code:"BillType",name:"订单类型",placeHolder:"",editor:{type:"combo-list",require:!1,valueType:"1",multiSelect:!0,data:[{value:"1",name:"1"},{value:"2",name:"2"},{value:"3",name:"3"}]}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",labelCode:"BillDate",code:"BillDate",name:"创建日期",placeHolder:"",editor:{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",type:"date-picker",require:!1,format:"yyyy-MM-dd",weekSelect:!1,startFieldCode:"BillDate",endFieldCode:"BillDate"}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",labelCode:"SecID",code:"SecID",name:"密级",placeHolder:"",editor:{type:"combo-list",require:!1,valueType:"1",multiSelect:!1,data:[{value:"a",name:"a"},{value:"b",name:"b"},{value:"c",name:"c"},{value:"d",name:"d"},{value:"e",name:"e"}]}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",labelCode:"SecLevel",code:"SecLevel",name:"密级",placeHolder:"",editor:{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",type:"number-range",require:!1,textAlign:"left",precision:0,isBigNumber:!1}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",labelCode:"ProjectID",code:"ProjectID",name:"所属项目",placeHolder:"",editor:{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",labelCode:"ProjectMrg",code:"ProjectMrg",name:"项目经理",placeHolder:"",editor:{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",labelCode:"AuditStatus",code:"AuditStatus",name:"订单状态",placeHolder:"",editor:{type:"radio-group",require:!1,valueType:"1",horizontal:!0,showLabel:!1,enumData:[{value:"1",name:"1"},{value:"2",name:"2"}]}}]},solutions:{type:Array,default:[{id:"c5df9edf-0e74-04b2-efb5-54572e1ab2e9",code:"Default",name:"默认筛选条件",mode:"1",type:"preset",conditions:[{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"EmployeeID.EmployeeID",fieldName:"制单人",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:13,content:{valueField:"id",value:[{id:"05701277-d0cf-bae1-a056-1d5ebe8ea9fa",code:"Sagi",name:"Sagi",userGroup:"0",sysOrgId:"001",tenantId:1e4,secLevel:"0",userType:0,note:null}],textValue:"Sagi"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:2,content:{value:[{id:"c4427472-95c6-e2c5-c3aa-ef6d537a1b33",code:"Inspur",name:"浪潮集团",treeinfo:{parentElement:"",sequence:2,layer:1,isDetail:!1}}],valueField:"id",textValue:"浪潮集团",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:15,content:{value:[],textValue:"",isInputText:!0}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[{value:"2",name:"2"}],key:"2"}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:1,content:{dateValue:"2023-09-01"}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[{value:"a",name:"a"},{value:"b",name:"b"}],key:"a,b"}}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",fieldCode:"SecLevel",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:123,endValue:213}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"订单状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:14,content:{value:"2"}}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",fieldCode:"ProjectID",fieldName:"所属项目",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{value:"dsfd "}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:6,content:{numValue:21333}}},{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",fieldCode:"ProjectMrg",fieldName:"项目经理",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{}}},{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",fieldCode:"Version",fieldName:"版本",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:4,content:{startTime:"2023-09-01",endTime:"2023-09-15"}}}],isPreset:!0,isDefault:!0,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"},{id:"3a491eb1-018e-e03e-d430-f05fccd894f3",code:"Order of The Month",name:"本月订单",mode:"1",type:"public",conditions:[{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"制单人",fieldName:"",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:13,content:{valueField:"",value:[],textValue:"help-text-value-null"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:2,content:{value:[],valueField:"",textValue:"help-text-value-null",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:15,content:{value:[],textValue:""}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:null,endValue:null}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[]}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:1,content:{dateValue:""}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[]}}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",fieldCode:"SecLevel",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:null,endValue:null}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"订单状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:14,content:{}}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",fieldCode:"ProjectID",fieldName:"所属项目",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{value:""}}}],isPreset:!1,isDefault:!1,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"},{id:"2120021b-df0c-0eef-d1d5-feaa78b01d7e",code:"Pending Orders of The Month",name:"本月待支付订单",mode:"2",type:"private",conditions:[{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",fieldCode:"id",fieldName:"标识",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:9,compareType:"0",relation:1,value:{type:0,content:{value:"123"}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"单据状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:6,compareType:"0",relation:1,lBracket:"(",value:{type:14,content:{value:"2"}}},{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"EmployeeID.EmployeeID",fieldName:"创建人",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:1,compareType:"0",relation:1,lBracket:"((",value:{type:13,content:{valueField:"id",value:[{id:"9e35953a-40fd-4a9a-922f-b9f59bf2a517",code:"sagi",name:"sagi",userGroup:"0",sysOrgId:"001",tenantId:1e4,secLevel:"PUBLIC",userType:3,note:null}],textValue:"sagi"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:2,compareType:"0",relation:1,rBracket:")",value:{type:2,content:{value:[{id:"1640d027-7531-2388-e5eb-6fe0ae8c9734",code:"SCM",name:"采购部",treeinfo:{parentElement:"001",sequence:2,layer:2,isDetail:!0}},{id:"001",code:"001",name:"销售部",treeinfo:{parentElement:"",sequence:1,layer:1,isDetail:!1}}],valueField:"id",textValue:"采购部,销售部",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:7,compareType:"0",relation:1,lBracket:"(",value:{type:15,content:{value:[],textValue:"123",isInputText:!0}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:8,compareType:"0",relation:1,rBracket:")))",value:{type:6,content:{numValue:5}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:3,compareType:"0",relation:1,lBracket:"(",value:{type:3,content:{value:[{value:"1",name:"1"}],key:"1"}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:4,compareType:"0",relation:1,lBracket:"(",value:{type:1,content:{dateValue:"2023-09-01"}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:5,compareType:"0",relation:1,rBracket:"))",value:{type:3,content:{value:[{value:"a",name:"a"},{value:"b",name:"b"},{value:"c",name:"c"}],key:"a,b,c"}}}],isPreset:!1,isDefault:!1,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"}]},isControlInline:{type:Boolean,default:!0},filterText:{type:String,default:"筛选"},expanded:{type:Boolean,default:!0}},uf=me(li,Dw,Tw,kw,Aw);function $w(t,n){function o(a,r){return r.map(s=>(s.conditions=s.conditions.filter(l=>a.find(p=>p.labelCode===l.fieldCode)),s))}return{filterCondition:o}}const ci=e.defineComponent({name:"FQuerySolution",props:li,emits:["save","saveAs","delete","change","conditionChange"],setup(t,n){const o=e.ref(t.fields),a=e.ref(t.isControlInline),r=e.ref([]),i=$w(),{filterCondition:s}=i,l=e.ref(null);e.onMounted(()=>{r.value=s(t.fields,t.solutions),l.value=Ee.cloneDeep(r.value[0])});const p=e.computed(()=>l.value?l.value.mode:"1"),c={1:_n,2:Qo},f=e.computed(()=>l.value?l.value.name:""),u=e.computed(()=>!l.value||l.value.mode!=="2"),d=e.ref(!1),m=e.computed(()=>({"dropdown-menu":!0,show:d.value})),g=e.computed(()=>({"farris-panel":!0,"position-relative":!0,"query-solution":!0})),h=e.computed(()=>({border:"none"}));function y(T){l.value=T}function v(){if(!l.value){console.warn("no querysolution");return}l.value.conditions.forEach(T=>{T.value.clear()})}function b(){n.emit("save",l.value)}function x(){n.emit("saveAs",l.value)}function C(T,E){n.emit("change",T,E)}function w(T){n.emit("change",T)}function V(T,E){n.emit("change",T,E)}function N(){const T=r.value.map(E=>e.createVNode("li",{class:"dropdown-item",onClick:()=>y(E)},[E.name]));return T.push(e.createVNode("li",{class:"solution-header-title-btns"},[e.createVNode("span",{class:"dropdown-item-btn ",onClick:b},[e.createTextVNode("保存")]),e.createVNode("span",{class:"dropdown-item-btn ml-2 mr-2",onClick:x},[e.createTextVNode("另存为")])])),e.createVNode("ul",{class:m.value},[T])}function S(){d.value=!d.value}function D(){return e.createVNode("div",null,null)}function k(){return e.createVNode("div",{class:"solution-action"},[e.createVNode("div",{class:"btn-group"},[e.createVNode("button",{type:"button",class:"btn btn-primary "},[e.createTextVNode("查询")])]),u.value&&e.createVNode("div",{class:"icon-group ml-2"},[e.createVNode("span",{class:"icon-group-remove",onClick:v,title:"清空"},[e.createVNode("span",{class:"f-icon f-icon-remove"},null)])])])}function A(){return e.createVNode("div",{class:"solution-header"},[e.createVNode("div",{class:"btn-group mr-3",onClick:S},[e.createVNode("div",{class:"solution-header-title"},[f.value,e.createVNode("span",{class:"f-icon f-accordion-expand"},null)]),N()]),D(),k()])}function $(){const T=c[p.value]||_n;return l.value&&e.createVNode(T,{key:l.value.id,fields:o.value,conditions:l.value.conditions,isControlInline:a.value,onValueChange:(E,B)=>C(E,B),onLabelCodeChange:E=>w(E),onCompareTypeChange:(E,B)=>V(E,B)},null)}return()=>e.createVNode("div",{class:g.value,tabindex:"1",style:h.value},[A(),$()])}}),Ew=e.defineComponent({name:"FQuerySolutionDesign",props:li,emits:["save","saveAs"],setup(t,n){const o=e.ref(t.fields),a=e.ref(t.solutions[0]),r=e.ref(),i=e.inject("design-item-context"),s=ye(r,i);e.onMounted(()=>{r.value.componentInstance=s}),n.expose(s.value);const l=e.computed(()=>a.value.name||""),p=e.computed(()=>a.value.mode!=="2"),c=e.computed(()=>({"farris-panel":!0,"position-relative":!0,"query-solution":!0})),f=e.computed(()=>({border:"none"}));function u(){return e.createVNode("div",{class:"solution-action"},[e.createVNode("div",{class:"btn-group"},[e.createVNode("button",{type:"button",class:"btn btn-primary "},[e.createTextVNode("查询")])]),p.value&&e.createVNode("div",{class:"icon-group ml-2"},[e.createVNode("span",{class:"icon-group-remove",title:"清空"},[e.createVNode("span",{class:"f-icon f-icon-remove"},null)])])])}function d(){return e.createVNode("div",{class:"solution-header"},[e.createVNode("div",{class:"btn-group mr-3"},[e.createVNode("div",{class:"solution-header-title"},[l.value,e.createVNode("span",{class:"f-icon f-accordion-expand"},null)])]),u()])}function m(){const g=_n;return e.createVNode(g,{fields:o.value,conditions:a.value.conditions},null)}return()=>e.createVNode("div",{ref:r,class:c.value,tabindex:"1",style:f.value},[d(),m()])}}),ff={install(t){t.component(ci.name,ci),t.component(ko.name,ko)},register(t,n,o){t["query-solution"]=ci,t["query-solution-config"]=ko,n["query-solution"]=uf,n["query-solution-config"]=Rx},registerDesigner(t,n,o){t["query-solution"]=Ew,n["query-solution"]=uf}},Bw=e.defineComponent({name:"FRadioGroupDesign",props:$r,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),{enumData:a,onClickRadio:r,getValue:i,getText:s}=lu(t,n,o),l=e.computed(()=>({"farris-checkradio-hor":t.horizontal})),p=e.ref(),c=e.inject("design-item-context"),f=ye(p,c);return e.onMounted(()=>{p.value.componentInstance=f}),n.expose(f.value),()=>e.createVNode("div",{class:["farris-input-wrap",l.value],ref:p},[a.value.map((u,d)=>{const m="radio_"+t.name+d;return e.createVNode("div",{class:"custom-control custom-radio"},[e.createVNode("input",{type:"radio",class:"custom-control-input",name:t.name,id:m,value:i(u),checked:i(u)===o.value,disabled:t.disabled,tabindex:t.tabIndex,onClick:g=>r(u,g)},null),e.createVNode("label",{class:"custom-control-label",for:m},[s(u)])])})])}}),pf={install(t){t.component(Ao.name,Ao)},register(t,n,o){t["radio-group"]=Ao,n["radio-group"]=su},registerDesigner(t,n,o){t["radio-group"]=Bw,n["radio-group"]=su}},Fw=new Map([["appearance",ge]]);function Iw(t,n,o){return n}const Mw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/rate.schema.json",title:"rate",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for rate",type:"string"},type:{description:"The type string of rate",type:"string",default:"rate"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Ow={title:"rate",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},di={size:{type:String,default:"large"},enableHalf:{type:Boolean,default:!1},enableClear:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},pointSystem:{type:Number,default:5},lightColor:{type:String,default:""},darkColor:{type:String,default:""},iconClass:{type:String,default:"f-icon-star"},numOfStar:{type:Number,default:5},toolTipDisabled:{type:Boolean,default:!0},toolTipContents:{type:Array,default:["很不满意","不满意","一般","满意","非常满意"]},enableScore:{type:Boolean,default:!0},enableSatisfaction:{type:Boolean,default:!1},value:{type:Number,default:0},modelValue:{type:Number,default:0}},mf=me(di,Mw,Fw,Iw,Ow),Lo=e.defineComponent({name:"FRate",props:di,emits:["selectedValue","update:modelValue"],setup(t,n){const o=e.ref(t.size),a=e.ref(t.enableHalf),r=e.ref(t.enableClear),i=e.ref(t.disabled),s=e.ref(t.pointSystem),l=e.ref(t.lightColor),p=e.ref(t.darkColor),c=e.ref(t.iconClass),f=e.ref(t.numOfStar),u=e.ref(t.toolTipDisabled),d=e.ref(t.toolTipContents),m=e.ref(t.enableScore),g=e.ref(t.enableSatisfaction);let h;const y=e.ref(0),v=e.ref(0),b=e.ref(0),x=e.ref(t.modelValue);let C=1,w,V,N;const S=4;e.onMounted(()=>{});function D(){const O=f.value;N=[];for(let W=1;W<=O;W++)N.push({id:W})}function k(){let O;a.value?O=Math.ceil(x.value/C):O=x.value,v.value=(h*x.value+Math.floor(x.value)*S)/C,w=d.value[O-1]}function A(){switch(o.value){case"small":h=14;break;case"middle":h=16;break;case"large":h=18;break;case"extraLarge":h=24;break}D(),f.value&&(C=s.value/f.value),x.value&&k()}A();function $(O){return O.className.indexOf("f-icon")!==-1}function T(){return y.value===v.value&&r.value&&v.value!==0?(v.value=0,x.value=0,V=null,y.value=0,b.value=0,n.emit("selectedValue",x.value),n.emit("update:modelValue",x.value),!0):!1}function E(O,W,M){if(O.movementX||O.movementY){if(i.value)return;g.value&&(w=d.value[W-1]),O.offsetX<h/2&&a.value===!0?(y.value=h*W-h/2+S*(W-1),b.value=C*W-C/2):(y.value=h*W+S*(W-1),b.value=C*W)}if(M===!0){if(T())return;x.value=b.value,v.value=y.value,V=w,n.emit("update:modelValue",x.value),n.emit("selectedValue",x.value)}}function B(O,W){var M;if($(O.target)&&O.target){const _=parseInt((M=O.target)==null?void 0:M.id);E(O,_,W)}}const I=e.computed(()=>b.value?b.value+"分":x.value+"分"),F=e.computed(()=>({width:(y.value||v.value)+"px"}));function R(){y.value=0}return e.watch(()=>t.modelValue,O=>{x.value=O,k()}),()=>e.createVNode("div",{class:"farris-star-rating",onMouseover:e.withModifiers(O=>B(O,!1),["prevent"]),onMousemove:e.withModifiers(O=>B(O,!1),["prevent"]),onMouseleave:e.withModifiers(O=>R(),["prevent"]),onClick:e.withModifiers(O=>B(O,!0),["prevent"])},[e.createVNode("div",{class:"star-light-area",style:F.value},[N.map(O=>e.createVNode("span",{class:["f-icon default-light-color ",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"},{disabled:u.value}],id:O.id,style:{color:l.value}},null))]),e.createVNode("div",{class:["star-dark-area",{small:o.value==="small"},{middle:o.value==="middle"},{large:o.value==="large"}]},[N.map(O=>e.createVNode("span",{class:["f-icon default-dark-color",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"}],id:O.id,style:{color:p.value}},null))]),e.createVNode("div",{class:["f-utils-fill",{"font-small":o.value==="small"},{"font-middle":o.value==="middle"},{"font-large":o.value==="large"},{"font-exlarge":o.value==="extraLarge"}]},[m.value&&e.createVNode("span",null,[e.createTextVNode(" "),I.value,e.createTextVNode(" ")]),g.value&&(V||w)&&e.createVNode("span",null,[e.createTextVNode(" "),w||V])])])}}),Pw=e.defineComponent({name:"FRateDesign",props:di,emits:["selectedValue"],setup(t,n){const o=e.ref(t.size),a=e.ref(t.enableHalf),r=e.ref(t.enableClear),i=e.ref(t.disabled),s=e.ref(t.pointSystem),l=e.ref(t.lightColor),p=e.ref(t.darkColor),c=e.ref(t.iconClass),f=e.ref(t.numOfStar),u=e.ref(t.toolTipDisabled),d=e.ref(t.toolTipContents),m=e.ref(t.enableScore),g=e.ref(t.enableSatisfaction);let h;const y=e.ref(1);let v=0;const b=e.ref(0),x=e.ref(0);let C=1,w,V,N;const S=4,D=e.ref(),k=e.inject("design-item-context"),A=ye(D,k);e.onMounted(()=>{D.value.componentInstance=A}),n.expose(A.value),e.onMounted(()=>{});function $(){const M=f.value;N=[];for(let _=1;_<=M;_++)N.push({id:_})}function T(){let M;a.value?M=Math.ceil(x.value/C):M=x.value,v=(h*x.value+Math.floor(x.value)*S)/C,w=d.value[M-1]}function E(){switch(o.value){case"small":h=14;break;case"middle":h=16;break;case"large":h=18;break;case"extraLarge":h=24;break}$(),f.value&&(C=s.value/f.value),x.value&&T()}E();function B(M){return M.className.indexOf("f-icon")!==-1}function I(){return y.value===v&&r&&v!==0?(v=0,x.value=0,V=null,y.value=0,b.value=0,n.emit("selectedValue",x.value),!0):!1}function F(M,_,H){if(M.movementX||M.movementY){if(i.value)return;g.value&&(w=d.value[_-1]),M.offsetX<h/2&&a.value===!0?(y.value=h*_-h/2+S*(_-1),b.value=C*_-C/2):(y.value=h*_+S*(_-1),b.value=C*_)}if(H===!0){if(I())return;x.value=b.value,v=y.value,V=w,n.emit("selectedValue",x.value)}}function R(M,_){if(B(M.target)&&M.target){const H=parseInt(M.target.id);F(M,H,_)}}const O=e.computed(()=>b.value?b.value+"分":x.value+"分"),W=e.computed(()=>({width:(y.value||v)+"px"}));return()=>e.createVNode("div",{class:"farris-star-rating",ref:D,onMouseover:e.withModifiers(M=>R(M,!1),["prevent"]),onMousemove:e.withModifiers(M=>R(M,!1),["prevent"]),onMouseout:e.withModifiers(M=>R(M,!1),["prevent"]),onClick:e.withModifiers(M=>R(M,!0),["prevent"])},[e.createVNode("div",{class:"star-light-area",style:W.value},[N.map(M=>e.createVNode("span",{class:["f-icon default-light-color ",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"},{disabled:u.value}],id:M.id,style:{color:l.value}},null))]),e.createVNode("div",{class:["star-dark-area",{small:o.value==="small"},{middle:o.value==="middle"},{large:o.value==="large"}]},[N.map(M=>e.createVNode("span",{class:["f-icon default-dark-color",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"}],id:M.id,style:{color:p.value}},null))]),e.createVNode("div",{class:["f-utils-fill",{"font-small":o.value==="small"},{"font-middle":o.value==="middle"},{"font-large":o.value==="large"},{"font-exlarge":o.value==="extraLarge"}]},[m.value&&e.createVNode("span",null,[e.createTextVNode(" "),O.value,e.createTextVNode(" ")]),g.value&&(V||w)&&e.createVNode("span",null,[e.createTextVNode(" "),w||V])])])}}),hf={install(t){t.component(Lo.name,Lo)},register(t,n,o){t.rate=Lo,n.rate=mf},registerDesigner(t,n,o){t.rate=Pw,n.rate=mf}},gf=new Map([["appearance",ge]]);function _w(t,n,o){return o.splitter&&(n.contents=String(o.splitter).split(":").map(a=>{const r=t.getSchemaByType("response-layout-item");return r.appearance={class:`h-100 col-${a} px-0`},r})),n}const Rw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout.schema.json",title:"response-layout",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout",type:"string"},type:{description:"The type string of Respnse Layout component",type:"string",default:"response-layout"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},Lw={title:"responseLayout",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"ResponseLayout",enum:[]}}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"外联样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"}}},appearanceStyle:{description:"样式",type:"cascade",title:"内联样式",properties:{inlineStyle:{description:"",title:"inlineStyle",type:"custom"}}}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}},layout:{description:"",title:"布局",properties:{layout:{description:"配置布局容器内区块个数及比例",type:"custom",title:"是否可见",editor:{},editorParams:{layout:[]}}}}}},ui={customClass:{type:String,default:""}},yf=me(ui,Rw,gf,_w,Lw),fi=e.defineComponent({name:"FResponseLayout",props:ui,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}}),Hw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-item.schema.json",title:"response-layout-item",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout Item",type:"string"},type:{description:"The type string of Respnse Layout Item component",type:"string",default:"response-layout-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},pi={customClass:{type:String,default:""}},bf=me(pi,Hw,gf),Ho=e.defineComponent({name:"FResponseLayoutItem",props:pi,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}}),jw=e.defineComponent({name:"FResponseLayoutDesign",props:ui,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return r.value.canNested=!1,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{ref:o,class:"d-flex response-layout"},[n.slots.default&&n.slots.default()])}}),Ww=e.defineComponent({name:"FResponseLayoutItemDesign",props:pi,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return r.value.canNested=!1,r.value.canMove=!1,r.value.canDelete=!1,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(Ho,{ref:o},{default:()=>[n.slots.default&&n.slots.default()]})}}),vf={install(t){t.component(fi.name,fi).component(Ho.name,Ho)},register(t,n,o){t["response-layout"]=fi,t["response-layout-item"]=Ho,n["response-layout"]=yf,n["response-layout-item"]=bf},registerDesigner(t,n,o){t["response-layout"]=jw,t["response-layout-item"]=Ww,n["response-layout"]=yf,n["response-layout-item"]=bf}},xf={defaultState:{defaultGroupNumber:3,mode:"standard"},importData:[{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:2,label:"编号",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"标签",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"收件方",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:12,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:1,displayWidthInEL:6,label:"送达方",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"人员",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"邮寄地址",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"电话号码",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"负责人",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"邮箱",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"发件日期",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"收件日期",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"件数",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:6,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:2,displayWidthInEL:2,label:"售达方",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:12,columnInLG:6,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:2,displayWidthInEL:3,label:"本位币",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:2,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:1,label:"收款本币金额长标题",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:3,label:"汇率",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:1,label:"现金流项目",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:1,label:"摘要",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:1,label:"制单人",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:2,label:"结算方式",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:6,columnInLG:6,columnInEL:6,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:2,displayWidthInEL:3,label:"当前汇率",componentRow:0,showTopBorder:0,group:4},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:3,label:"本国汇率",componentRow:0,showTopBorder:0,group:4},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:3,label:"他国汇率",componentRow:0,showTopBorder:0,group:4}]},qw={initialState:{type:Object,default:xf},height:{type:Number,default:700},width:{type:Number,default:750}},zw={defaultStates:{type:Object,default:{mode:""}},onSwitchInStandardModeChanged:{type:Function,default:()=>{}},onCurrentScreenResolutionChanged:{type:Function,default:()=>{}},onScreenNameChanged:{type:Function,default:()=>{}}},Gw=new Map([["appearance",ge]]),Uw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/switch.schema.json",title:"switch",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a switch",type:"string"},type:{description:"The type string of switch component",type:"string",default:"switch"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function Yw(t,n,o){return n}const Zw={title:"switch",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},mi={modelValue:{type:Boolean,default:!1},disable:{type:Boolean},onBackground:{type:String},offBackground:{type:String},onColor:{type:String},offColor:{type:String},onLabel:{type:String},offLabel:{type:String},size:{type:String,default:"medium"},onModelValueChanged:{type:Function,default:()=>{}}},Cf=me(mi,Uw,Gw,Yw,Zw),jo=e.defineComponent({name:"FSwitch",props:mi,emits:["update:modelValue","modelValueChanged"],setup(t,n){const{disable:o,size:a,onLabel:r,offLabel:i,onBackground:s,offBackground:l,onColor:p,offColor:c}=e.toRefs(t),f=e.ref(t.modelValue),u=e.computed(()=>({switch:!0,"f-cmp-switch":!0,checked:f.value,disabled:o.value,"switch-large":a.value==="large","switch-medium":a.value==="medium","switch-small":a.value==="small"})),d=e.computed(()=>f.value?{outline:"none",background:s.value}:{outline:"none",backgroundColor:l.value}),m=e.computed(()=>f.value?{background:p.value}:{backgroundColor:c.value}),g=e.computed(()=>(r==null?void 0:r.value)||(i==null?void 0:i.value));function h(){o.value||(f.value=!f.value,n.emit("update:modelValue",f.value))}return e.watch(f,(y,v)=>{y!==v&&n.emit("modelValueChanged",y)}),()=>e.createVNode("span",{tabindex:"0",role:"button",class:u.value,style:d.value,onClick:h},[g.value&&e.createVNode("span",{class:"switch-pane"},[e.createVNode("span",{class:"switch-label-checked"},[r==null?void 0:r.value]),e.createVNode("span",{class:"switch-label-unchecked"},[i==null?void 0:i.value])]),e.createVNode("small",{style:m.value},[n.slots.default&&n.slots.default()])])}}),Kw=e.defineComponent({name:"FScreenResolutionSelector",props:zw,emits:["screenNameChanged","currentScreenResolutionChanged","switchInStandardModeChanged"],setup(t,n){const o=e.ref([{name:"小屏幕",code:"SM",value:"SM",active:!1},{name:"中等屏幕",code:"MD",value:"MD",active:!0},{name:"大屏幕",code:"LG",value:"LG",active:!1},{name:"极大屏幕",code:"EL",value:"EL",active:!1}]),a=e.ref(t.defaultStates),r=e.ref("MD"),i=e.ref("中等屏幕"),s=e.ref(!1);function l(f){o.value.forEach(u=>{u.active=u.code===f,u.active&&(r.value=u.code,i.value=u.name,n.emit("screenNameChanged",i.value),n.emit("currentScreenResolutionChanged",r.value))})}function p(){n.emit("switchInStandardModeChanged",s.value)}e.onBeforeMount(()=>{a.value.mode==="standard"?(s.value=!0,p()):s.value=!1});function c(){return e.createVNode(Vn,{class:"f-layout-editor-screen-resolution-selector-frame",items:o.value,modelValue:r.value,"onUpdate:modelValue":f=>r.value=f,onChange:l},null)}return()=>e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-header"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-form"},[e.createTextVNode("表单布局配置")])]),c(),e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-switch"},[e.createVNode(jo,{class:"f-layout-editor-show-switch",modelValue:s.value,"onUpdate:modelValue":f=>s.value=f,onModelValueChanged:p},null),s.value?e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("标准模式")]):e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("自定义模式")])])])}}),Qw={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},currentArea:{type:Object,default:[]},twoDimensionalArray:{type:Array,default:[]}},Xw={item:{type:Object,default:{}},currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1}},Jw=e.defineComponent({name:"FColumnWidthView",props:Xw,emits:[],setup(t,n){const o=e.ref(t.item),a=e.ref(t.currentScreenResolution),r=e.computed(()=>`col-${o.value[`columnIn${a.value}`]}`);return e.watch([()=>t.item,()=>t.currentScreenResolution],([i,s],[l,p])=>{i!==l&&(o.value=i),s!==p&&(a.value=s)}),()=>e.createVNode("div",{class:r.value},[e.createVNode("div",{class:"f-layout-editor-column-width-view",title:o.value.label},[e.createVNode("div",{class:"f-layout-editor-column-width-view-label"},[o.value.label])])])}}),eV=e.defineComponent({name:"FPreview",props:Qw,emits:["update:twoDimensionalArray"],setup(t,n){const o=e.ref(t.currentScreenResolution),a=e.ref(t.switchInStandardMode),r=e.ref(t.currentArea),i=e.ref(t.twoDimensionalArray),s=e.ref([]);e.watch([()=>t.currentArea,()=>t.switchInStandardMode,()=>t.currentScreenResolution],([u,d,m],[g,h,y])=>{u!==g&&(r.value=u),d!==h&&(a.value=d),m!==y&&(o.value=m)}),e.watch(()=>t.twoDimensionalArray,()=>{i.value=t.twoDimensionalArray,l()}),e.onMounted(()=>{l()});function l(){s.value=Ee.cloneDeep(i.value),s.value=p()}function p(){const u=[];let d=1;return s.value.forEach(m=>{const g=c(m,d);d+=g.length,u.push(g)}),u}function c(u,d){const m=[];let g=[];return u.forEach(h=>{d!==h.componentRow&&(d+=1,m.push(g),g=[]),g.push(h)}),m.push(g),m}function f(){if(a.value)return"";const u=Array.from({length:12},()=>e.createVNode("div",{class:"col-1"},[e.createVNode("div",{class:"f-layout-editor-preview-customize-single-background"},[e.createTextVNode(" ")])]));return e.createVNode("div",{class:"f-layout-editor-preview-customize-whole-background"},[u])}return()=>e.createVNode("div",{class:"f-layout-editor-preview f-utils-fill-flex-column"},[e.createVNode("div",{class:"f-layout-editor-preview-header"},[e.createTextVNode("预览区")]),f(),e.createVNode("div",{class:"f-layout-editor-preview-view f-utils-overflow-xhya"},[e.createVNode("div",{class:"f-layout-editor-preview-row-group"},[s.value.map(u=>{var d,m;return((d=u[0][0])==null?void 0:d.group.toString())===((m=r.value[0])==null?void 0:m.id)&&u.map(g=>e.createVNode("div",{class:"f-layout-editor-row"},[g.map(h=>e.createVNode(Jw,{item:h,"onUpdate:item":y=>h=y,currentScreenResolution:o.value,switchInStandardMode:a.value},null))]))})])])])}}),tV={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},originalData:{type:Array,default:[]},originalDataCopy:{type:Array,default:[]},defaultStates:{type:Object,default:{}},onTwoDimensionalArrayChanged:{type:Function,default:()=>{}},onOriginalDataChanged:{type:Function,default:()=>{}}};function nV(t,n){const o=e.ref(-1),a=e.ref(!1);function r(u){if(u.target.offsetParent){const d=u.target.offsetParent,m=d.offsetWidth-u.target.offsetWidth/2-4,g=d.offsetHeight/2;u.dataTransfer&&u.dataTransfer.setDragImage(d,m,g)}}function i(u){if(u){const d=t.value.findIndex(m=>m.label===u.label);setTimeout(()=>{o.value=d,a.value=!0,u.moving=!0})}}function s(u,d){u.stopPropagation(),r(u),i(d)}function l(u){const d=t.value.findIndex(m=>m.label===u.label);if(o.value!==d){const m=t.value[o.value],g=t.value;g.splice(o.value,1),g.splice(d,0,m),o.value=d,n&&n()}}function p(u,d){u.preventDefault(),l(d)}function c(u){u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="move")}function f(u,d){d&&(d.moving=!1),a.value=!1}return{dragstart:s,dragenter:p,dragover:c,dragend:f,isDragging:a}}const oV={currentScreenResolution:{type:String,default:""},field:{type:Object,default:{}},switchInStandardMode:{type:Boolean,default:!1},fieldChanged:{type:Function,default:()=>{}}},aV=new Map([["appearance",ge]]);function rV(t,n,o){return n}const iV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-button.schema.json",title:"radio-button",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for radio-button",type:"string"},type:{description:"The type string of radio-button",type:"string",default:"radio-button"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},sV={title:"radio-button",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},hi={enumData:{type:Array,default:[{text:"1",active:!0}]},suffixValue:{type:String,default:""},onSelectedValueChanged:{type:Function,default:()=>{}}},wf=me(hi,iV,aV,rV,sV),Wo=e.defineComponent({name:"FRadioButton",props:hi,emits:["selectedValueChanged"],setup(t,n){const o=e.ref(t.enumData);function a(i,s){if(i.currentTarget.classList.value="btn btn-secondary active",i.currentTarget.tagName.toLowerCase()==="label"){const{currentTarget:l}=i,p=l.parentElement;Array.from(p.querySelectorAll("label")).filter(f=>f!==l).forEach(f=>f.classList.remove("active"))}n.emit("selectedValueChanged",s)}function r(i){return`${i.text}${t.suffixValue}`}return e.watch(()=>t.enumData,(i,s)=>{i!==s&&(o.value=t.enumData)}),()=>e.createVNode("div",{class:"f-radio-button"},[e.createVNode("div",{class:["farris-input-wrap"]},[o.value.map((i,s)=>e.createVNode(e.Fragment,null,[e.createVNode("label",{class:i.active?"btn btn-secondary active":"btn btn-secondary",onClick:l=>a(l,i)},[e.createVNode("span",{class:"f-radio-button-text"},[r(i)])])]))])])}}),lV=e.defineComponent({name:"FColumnWidthEditor",props:oV,emits:["fieldChanged"],setup(t,n){const o={SM:["1"],MD:["1","2"],LG:["1","2","3","4"],EL:["1","2","3","4","5","6"]},a=e.ref(t.currentScreenResolution),r=e.ref(t.field),i=e.ref(t.switchInStandardMode),s=e.ref(),l=e.ref(""),p=e.ref(),c=e.ref("customize"),f=e.ref(),u=e.inject("ResponseLayoutEditorDraggableComposition"),{dragstart:d,dragenter:m,dragover:g,dragend:h}=u;function y(){s.value=o==null?void 0:o[a.value],i.value?(l.value=`displayWidthIn${a.value}`,c.value=`${r.value[l.value]}`):(l.value=`columnIn${a.value}`,f.value=r.value[l.value])}function v(D){if(i.value===!0){const k=Number(D==null?void 0:D.text);p.value=k;const A=r.value[`columnIn${a.value}`]/r.value[`displayWidthIn${a.value}`];r.value[`columnIn${a.value}`]=k*A,r.value[`displayWidthIn${a.value}`]=Number(k),n.emit("fieldChanged",r.value)}}function b(D){f.value=D;const k=r.value[`columnIn${a.value}`]/r.value[`displayWidthIn${a.value}`];r.value[`columnIn${a.value}`]=f.value,r.value[`displayWidthIn${a.value}`]=f.value/k,n.emit("fieldChanged",r.value)}function x(){return e.createVNode(Lo,{enableHalf:!0,size:"extraLarge",pointSystem:12,numOfStar:6,lightColor:"#5D89FE",darkColor:"#e7e9f3",iconClass:"f-icon-column-rectangle",modelValue:f.value,"onUpdate:modelValue":D=>f.value=D,enableScore:!1,onSelectedValue:()=>b(f.value)},null)}function C(){const D=[];s.value=o==null?void 0:o[a.value];const k=r.value[`displayWidthIn${a.value}`];return s.value.forEach(A=>{const $={text:A,active:k.toString()===A};D.push($)}),D}function w(){const D=C();return e.createVNode(Wo,{enumData:D,suffixValue:"列",onSelectedValueChanged:v},{default:()=>[e.createTextVNode(" ")]})}function V(){var D;if(((D=r==null?void 0:r.value)==null?void 0:D.showTopBorder)===1)return e.createVNode("div",{class:"f-layout-editor-column-width-editor-row"},[e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-left"},null),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-middle"},[e.createTextVNode("第"),r.value.componentRow,e.createTextVNode("行")]),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-right"},null)])}function N(){return i.value?e.createVNode("div",{class:"f-column-width-editor-switch-standard"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-click-button"},[w()])]):e.createVNode("div",{class:"f-column-width-editor-switch-customize",onDragenter:D=>m(D,r.value),onDragend:D=>h(D,r.value),onDragover:D=>g(D)},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-rectangle"},[x(),e.createVNode("div",{class:"f-layout-editor-rate-show-column"},[f.value,e.createTextVNode("列")]),e.createVNode("span",{class:"f-layout-editor-drag-handler f-icon f-icon-drag-vertical",draggable:"true",onDragstart:D=>d(D,r.value)},null)])])}function S(){var D;return e.createVNode("div",{class:"f-layout-editor-column-width-editor-component"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-label"},[(D=r==null?void 0:r.value)==null?void 0:D.label]),N()])}return e.watch(()=>[t.field,t.switchInStandardMode,t.currentScreenResolution],([D,k,A],[$,T,E])=>{A!==E&&(a.value=A,s.value=o[a.value],y()),k!==T&&(i.value=k),i.value===!1&&y(),D!==$&&(r.value=D)}),e.onMounted(()=>{y()}),()=>e.createVNode("div",{class:"f-layout-editor-column-width-editor"},[V(),S()])}}),cV=e.defineComponent({name:"FFieldList",props:tV,emits:["update:currentArea","twoDimensionalArrayChanged","originalDataChanged"],setup(t,n){const o=e.ref(t.currentScreenResolution),a=e.ref(t.switchInStandardMode),r=e.ref(t.originalData),i=e.ref(t.originalDataCopy),s=e.ref(t.defaultStates),l=e.ref(""),p=e.ref([]),c=e.ref(t.currentArea),f=e.ref(0),u=e.ref(),d=e.ref(0),m=e.ref("1"),g=e.ref([]);function h(){var B;let E=y();for(let I=0;I<E.length;I++){const F={id:(B=E[I])==null?void 0:B.toString(),label:"区域"+E[I]};p.value.push(F)}v()}function y(){let E=[];return r.value.forEach(B=>{E.indexOf(B.group)===-1&&E.push(B.group)}),E}function v(){m.value=s.value.defaultGroupNumber.toString(),l.value=`区域${m.value}`,c.value=[p.value[Number(m.value)-1]],n.emit("update:currentArea",c.value)}function b(){let E=[];u.value=[];let B=1;r.value.forEach(I=>{I.group===B||(B+=1,u.value.push(E),E=[]),E.push(I)}),u.value.push(E)}function x(){u.value[c.value[0].id-1]=Ee.cloneDeep(g.value);let E=[];d.value=0,u.value.forEach(B=>{let I=w(B,d.value);E.push(I),d.value=I[I.length-1].componentRow}),V(E)}function C(){b();let E=[];return d.value=0,u.value.forEach(B=>{let I=w(B,d.value);E.push(I),d.value=I[I.length-1].componentRow}),n.emit("twoDimensionalArrayChanged",u.value),V(E),r.value}function w(E,B){let F=12;return f.value=1+B,E.forEach(R=>{R.showTopBorder=0;let O=R[`columnIn${o.value}`];F>=O?(R.componentRow=f.value,F-=O):(f.value+=1,R.componentRow=f.value,F=12-O,R.showTopBorder=1)}),E[0].showTopBorder=1,E}function V(E){let B=[];for(let I of E)B=B.concat(I);r.value=Ee.cloneDeep(B),d.value=0}function N(){return e.createVNode("div",{class:"f-layout-editor-field-list-top"},[e.createVNode("div",{class:"f-layout-editor-field-list-header"},[e.createTextVNode("组件列表")]),e.createVNode("div",{class:"f-layout-editor-choose-group"},[e.createVNode(rt,{modelValue:m.value,"onUpdate:modelValue":E=>m.value=E,placeholder:"当前可编辑组",enableClear:!1,"id-field":"id","text-field":"label",data:p.value,editable:!1,onChange:$},null)])])}function S(){return e.createVNode("div",{class:"f-layout-editor-field-list-content f-utils-overflow-xhya"},[g.value.map(E=>e.createVNode(lV,{key:E.label,currentScreenResolution:o.value,field:E,"onUpdate:field":B=>E=B,switchInStandardMode:a.value,"onUpdate:switchInStandardMode":B=>a.value=B,onFieldChanged:D},null))])}function D(E){g.value.forEach(B=>{B.label==E.label&&Object.assign(B,E)}),x(),A(),k()}function k(){g.value=[],r.value.forEach(E=>{E.group===Number(c.value[0].id)&&g.value.push(E)})}function A(){r.value=Ee.cloneDeep(C()),n.emit("originalDataChanged",r.value)}function $(E){for(let B=0;B<E.length;B++)c.value=[{id:E[B].id,label:E[B].label}];n.emit("update:currentArea",c.value),k(),x()}const T=nV(g,()=>{x(),A(),k()});return e.provide("ResponseLayoutEditorDraggableComposition",T),e.watch(()=>t.currentArea,(E,B)=>{E!==B&&(c.value=t.currentArea,k())}),e.watch(c,(E,B)=>{E!==B&&k()}),e.watch(()=>t.currentGroup,(E,B)=>{E!==B&&(l.value=t.currentGroup)}),e.watch(()=>t.currentScreenResolution,(E,B)=>{E!==B&&(o.value=t.currentScreenResolution,A(),b(),c.value[0]&&(g.value=Ee.cloneDeep(u.value[Number(c.value[0].id)-1])))}),e.watch(()=>t.switchInStandardMode,(E,B)=>{E!==B&&(a.value=t.switchInStandardMode,r.value=Ee.cloneDeep(i.value))}),e.watch(s,(E,B)=>{E!==B&&A()}),e.onBeforeMount(()=>{h(),C(),k()}),()=>e.createVNode("div",{class:"f-layout-editor-field-list f-utils-fill-flex-column"},[a.value?e.createVNode("div",{class:"f-layout-editor-field-list-standard f-utils-fill-flex-column"},[N(),S()]):e.createVNode("div",{class:"f-layout-editor-field-list-customize f-utils-fill-flex-column"},[N(),S()])])}}),qo=e.defineComponent({name:"FResponseLayoutEditor",props:qw,emits:["close","submit"],setup(t,n){const o=e.ref(t.initialState),a=e.ref(),r=e.ref(),i=e.ref(""),s=e.ref(""),l=e.ref(!1),p=e.ref([{id:"1",label:"区域1"}]),c=e.ref([]),f=e.ref(),u=e.ref(t.width),d=e.ref(t.height);e.watch(()=>t.initialState,D=>{o.value=D}),e.watch([()=>t.currentArea,()=>t.switchInStandardMode],([D,k],[A,$])=>{D!==A&&(p.value=D),k!==$&&(l.value=k)});function m(D){i.value=D}function g(D){s.value=D}function h(D){l.value=D}function y(D){p.value=[].concat(D)}function v(D){a.value=Ee.cloneDeep(D),console.log(a.value)}function b(D){c.value=D}function x(){n.emit("close")}function C(){n.emit("submit",a.value)}function w(){return e.createVNode(cV,{class:"f-utils-fill-flex-column",defaultStates:r.value,originalDataCopy:f.value,currentScreenResolution:s.value,"onUpdate:currentScreenResolution":D=>s.value=D,originalData:a.value,"onUpdate:originalData":D=>a.value=D,switchInStandardMode:l.value,"onUpdate:switchInStandardMode":D=>l.value=D,currentArea:p.value,"onUpdate:currentArea":D=>p.value=D,onCurrentAreaChanged:y,onTwoDimensionalArrayChanged:b,onOriginalDataChanged:v},null)}function V(){return e.createVNode(eV,{class:"f-utils-fill-flex-column",currentArea:p.value,"onUpdate:currentArea":D=>p.value=D,currentScreenResolution:s.value,"onUpdate:currentScreenResolution":D=>s.value=D,switchInStandardMode:l.value,twoDimensionalArray:c.value,"onUpdate:twoDimensionalArray":D=>c.value=D},null)}const N=e.computed(()=>l.value?"f-layout-editor-left-standard f-utils-fill-flex-column":"f-layout-editor-left-customize f-utils-fill-flex-column"),S=e.computed(()=>l.value?"f-layout-editor-right-standard f-utils-fill-flex-column":"f-layout-editor-right-customize f-utils-fill-flex-column");return e.onBeforeMount(()=>{a.value=Ee.cloneDeep(o.value.importData),f.value=Ee.cloneDeep(o.value.importData),r.value=o.value.defaultState,i.value="中等屏幕",s.value="MD"}),D=>e.createVNode("div",{class:"f-layout-editor f-utils-flex-column",style:"height:"+d.value+"px;width:"+u.value+"px;"},[e.createVNode("div",{class:"f-layout-editor-top"},[e.createVNode(Kw,{defaultStates:r.value,onScreenNameChanged:m,onCurrentScreenResolutionChanged:g,onSwitchInStandardModeChanged:h},null)]),e.createVNode("div",{class:"f-layout-editor-content f-utils-fill"},[e.createVNode("div",{class:"f-layout-editor-left f-utils-fill-flex-column"},[e.createVNode("div",{class:N.value},[w()])]),e.createVNode("div",{class:"f-layout-editor-right f-utils-fill-flex-column"},[e.createVNode("div",{class:S.value},[V()])])]),e.createVNode("div",{class:"f-layout-editor-bottom"},[e.createVNode("div",{class:"f-layout-editor-button"},[e.createVNode("div",{class:"f-layout-editor-cancel-btn",onClick:x},[e.createVNode("span",{class:"f-layout-editor-text-cancel"},[e.createTextVNode("取消")])]),e.createVNode("div",{class:"f-layout-editor-sure-btn",onClick:C},[e.createVNode("span",{class:"f-layout-editor-text-sure"},[e.createTextVNode("确认")])])])])])}}),dV=new Map([["appearance",ge]]);function uV(t,n,o,a){const r=t.getSchemaByType("section");return r.id=`${a}-section`,r.appearance={class:"f-section-form f-section-in-main"},r.mainTitle="标题",r.contents=[n],r}function fV(t,n,o,a){const r=t.getSchemaByType("component");return r.id=`${a}-component`,r.componentType="form-col-1",r.appearance={class:"f-struct-form f-struct-wrapper"},r.contents=[n],r}function pV(t,n,o){n.appearance={class:"f-form-layout farris-form farris-form-controls-inline"};const a=uV(t,n,o,n.id);return fV(t,a,o,n.id)}const mV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-editor-setting.schema.json",title:"response-layout-editor-setting",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for response layout editor",type:"string"},type:{description:"The type string of response layout editor component",type:"string",default:"response-layout-editor-setting"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]}},required:["id","type"]},hV={title:"response-form",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},gi={initialState:{type:Object,default:xf},height:{type:Number,default:700},width:{type:Number,default:750},modelValue:{type:Object}},Vf=me(gi,mV,dV,pV,hV),gV=e.defineComponent({name:"FResponseLayoutEditorSettingDesign",props:gi,emits:[],setup(t,n){const o=e.ref(t.initialState),a=e.ref(t.width),r=e.ref(t.height),i=e.ref(),s=e.inject("design-item-context"),l=ye(i,s);e.onMounted(()=>{i.value.componentInstance=l}),n.expose(l.value);function p(){const c=an.show({render:()=>e.createVNode(qo,{initialState:o,width:a,height:r},null),width:900,height:500,buttons:[{class:"btn btn-primary",text:"确定",iconClass:"f-icon f-icon-check",handle:()=>{c.unmount()}},{class:"btn btn-light",text:"取消",iconClass:"f-icon f-icon-close",handle:()=>{c.unmount()}}]})}return()=>e.createVNode("div",{ref:i,class:"f-column-width-setting-button",onClick:p},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),yi=e.defineComponent({name:"FResponseLayoutEditorSetting",props:gi,emits:["change"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.width),r=e.ref(t.height);e.watch(()=>t.modelValue,p=>{o.value=p});function i(p,c){n.emit("change",c),p&&p.unmount()}function s(p){p&&p.unmount()}function l(){if(!o.value.defaultState||!o.value.importData){const p=o.value.message||"只可以在响应式表单组件中调整响应式布局配置";Io.info(p,"");return}an.show({render:p=>e.createVNode(qo,{initialState:o,width:a.value,height:r.value,onClose:()=>s(p),onSubmit:c=>i(p,c)},null),width:900,height:500,showButtons:!1,showHeader:!1,showFloatingClose:!0})}return()=>e.createVNode("div",{class:"f-column-width-setting-button",onClick:l},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),Nf={install(t){t.component(qo.name,qo),t.component(yi.name,yi)},register(t,n,o){t["response-layout-editor-setting"]=yi,n["response-layout-editor-setting"]=Vf},registerDesigner(t,n,o){t["response-layout-editor-setting"]=gV,n["response-layout-editor-setting"]=Vf}},yV=new Map([["appearance",ge]]),bV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/search-box.schema.json",title:"search-box",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a search-box",type:"string"},type:{description:"The type string of search-box component",type:"string",default:"search-box"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function vV(t,n,o){return n}const xV={title:"search-box",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},bi={customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},data:{type:Array,default:[]},onChange:{type:Function,default:()=>{}},onModelValue:{type:Function,default:()=>{}},onSelectedValue:{type:Function,default:()=>{}},placeholder:{type:String,default:"请输入关键词"}},Sf=me(bi,bV,yV,vV,xV),CV={data:{type:Array,default:[]},onConfirmResult:{type:Function,default:()=>{}},onSearchedValue:{type:Function,default:()=>{}}},Tf=e.defineComponent({name:"FSearchBoxContainer",props:CV,emits:["confirmResult","searchedValue"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.computed(()=>({"search-box-container":!0}));function i(l){var p;(p=a.value)==null||p.search(l)}function s(l){l.length&&(n.emit("confirmResult",l[0].name),n.emit("searchedValue",l))}return n.expose({search:i}),()=>e.createVNode("div",{class:r.value},[e.createVNode(e.resolveComponent("f-list-view"),{ref:a,data:o.value,view:"SingleView",onClickItem:l=>s(l.data)},{default:()=>[e.createTextVNode(" ")]})])}}),vi=e.defineComponent({name:"FSearchBox",props:bi,emits:["update:modelValue","change","selectedValue"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.ref(),i=e.ref(t.placeholder),s=e.ref('<i class="f-icon f-icon-search"></i>'),l=e.ref(t.modelValue);e.watch(l,u=>{var d;(d=r.value)==null||d.search(u),n.emit("update:modelValue",u)}),e.watch(()=>t.modelValue,u=>{l.value=u});function p(u){a.value.commitValue(u)}function c(u){n.emit("change",u)}function f(u){n.emit("selectedValue",u)}return()=>e.createVNode("div",null,[e.createVNode(dt,{ref:a,"button-content":s.value,"custom-class":t.customClass,placeholder:i.value,onChange:u=>c(u),"enable-clear":!0,"button-behavior":"Execute",modelValue:l.value,"onUpdate:modelValue":u=>l.value=u,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[e.createVNode(Tf,{ref:r,data:o.value,onConfirmResult:p,onSearchedValue:u=>f(u)},null)]})])}}),wV=e.defineComponent({name:"FSearchBoxDesign",props:bi,emits:["update:modelValue","change"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.ref(),i=e.ref("请输入关键词"),s=e.ref('<i class="f-icon f-icon-search"></i>'),l=e.ref(t.modelValue),p=e.ref(),c=e.inject("design-item-context"),f=ye(p,c);e.onMounted(()=>{p.value.componentInstance=f}),n.expose(f.value),e.watch(l,m=>{var g;(g=r.value)==null||g.search(m),n.emit("update:modelValue",m)}),e.watch(()=>t.modelValue,m=>{l.value=m});function u(m){a.value.commitValue(m)}function d(m){n.emit("change",m)}return()=>e.createVNode("div",{ref:p},[e.createVNode(e.resolveComponent("f-button-edit"),{ref:a,"button-content":s.value,placeholder:i.value,onChange:d,"enable-clear":!0,"button-behavior":"Execute",modelValue:l.value,"onUpdate:modelValue":m=>l.value=m,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[e.createVNode(Tf,{ref:r,data:o.value,onConfirmResult:u},null)]})])}}),Df={install(t){t.component(vi.name,vi)},register(t,n,o){t["search-box"]=vi,n["search-box"]=Sf},registerDesigner(t,n,o){t["search-box"]=wV,n["search-box"]=Sf}};function VV(t,n){const o=e.ref(!1),a=e.ref(!1),r=ln();let i=!0,s=!1,l,p=!1;function c(h){return!(!Rt().basalDragulaRuleForContainer(h)||!i)}function f(){return!p}function u(){return!p}function d(){return s}function m(h){}function g(){o.value=!1,a.value=!1,p=!1,i=!0;const h=t,y=h.appearance&&h.appearance.class||"",v=y?y.split(" "):[],b=h.contents||[],x=b.length?b[0]:null,C=x&&x.appearance&&x.appearance.class||"",w=C?C.split(" "):[],V=b.length?b.reduce((T,E)=>{const B=E&&E.appearance?E.appearance.class:"",I=B?B.split(" "):[];return T.push(...I),T},[]):[],N=n,S=N&&N.appearance&&N.appearance.class||"",D=S?S.split(" "):[];l={componentClass:y,componentClassList:v,childContents:b,firstChildContent:x,firstChildClass:C,firstChildClassList:w,parent:N,parentClass:S,parentClassList:D,children:b,childrenClassList:V};const{canAccept:k,fixed:A,hidePadding:$}=r.getRuleValue(v[0],l);return i=k,s=$,p=A,!0}return{canAccepts:c,checkCanDeleteComponent:f,checkCanMoveComponent:u,hideNestedPaddingInDesginerView:d,onAcceptMovedChildElement:m,resolveComponentContext:g,triggerBelongedComponentToMoveWhenMoved:o,triggerBelongedComponentToDeleteWhenDeleted:a}}const NV=e.defineComponent({name:"FSectionDesign",props:xa,emits:[],setup(t,n){var C;const o=e.ref(),a=e.ref();let r=e.ref();const i=e.inject("design-item-context"),s=VV(i.schema,(C=i.parent)==null?void 0:C.schema),l=ye(o,i,s);l.value.styles="display: inherit;",e.onMounted(()=>{o.value.componentInstance=l}),n.expose(l.value);const p=e.ref(t.customClass),c=e.computed(()=>t.enableAccordion),f=e.ref(t.expandStatus),u=e.computed(()=>t.buttonPosition),d=e.ref(!1),m=Ll(t,n,f,a,r,d),g=Ca(t,n),h=e.computed(()=>{const w={"f-section":!0,"f-section-accordion":c.value==="default","f-state-collapse":(c.value==="default"||c.value==="custom")&&!f.value,"f-section-custom-accordion":c.value==="custom","f-section-fill":t.fill,"f-section-maximize":d.value,"f-utils-fill":!0,"p-0":!0};return p.value&&p.value.split(" ").reduce((V,N)=>(V[N]=!0,V),w),w}),y=e.computed(()=>{const w=t.contentClass.split(" "),V={"f-section-content":!0,"drag-container":!0};return w.reduce((N,S)=>(N[S]=!0,N),V),V}),v=e.computed(()=>{const w=t.extendClass.split(" "),V={"f-section-extend":!0};return w.reduce((N,S)=>(N[S]=!0,N),V),V});function b(){return n.slots.extend&&e.createVNode("div",{class:v.value},[n.slots.extend()])}function x(){return e.createVNode("div",{class:y.value,ref:o,"data-dragref":`${i.schema.id}-container`},[u.value==="inContent"&&g(),n.slots.default&&n.slots.default()])}return()=>e.createVNode("div",{class:h.value,ref:a},[m(),b(),x()])}}),kf={install(t){t.component(Sn.name,Sn)},register(t,n,o){t.section=Sn,n.section=Rl},registerDesigner(t,n,o){t.section=NV,n.section=Rl}},SV=new Map([["appearance",ge]]);function TV(t,n,o){return n}const DV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/smoke-detector.schema.json",title:"smoke-detector",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for smoke-detector",type:"string"},type:{description:"The type string of smoke-detector",type:"string",default:"smoke-detector"},voltageA:{description:"A相电压",type:"number",default:-1},voltageB:{description:"B相电压",type:"number",default:-1},voltageC:{description:"C相电压",type:"number",default:-1},forwardActiveTotalPower:{description:"正向有功总电量",type:"number",default:-1},totalPositiveReactivePower:{description:"正向无功总电量",type:"number",default:-1},reverseTotalActivePower:{description:"反向有功总电量",type:"number",default:-1},reverseTotalReactivePower:{description:"反向无功总电量",type:"number",default:-1},toDeliverData:{description:"下发数据",type:"string"}},required:["id","type"]},kV={title:"smoke-detector",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},bussinessProperties:{description:"",title:"业务属性",properties:{voltageA:{description:"A相电压",type:"number",title:"A相电压",default:-1},voltageB:{description:"B相电压",type:"number",title:"B相电压",default:-1},voltageC:{description:"C相电压",type:"number",title:"C相电压",default:-1},forwardActiveTotalPower:{description:"正向有功总电量",type:"number",title:"正向有功总电量",default:-1},totalPositiveReactivePower:{description:"正向无功总电量",type:"number",title:"正向无功总电量",default:-1},reverseTotalActivePower:{description:"反向有功总电量",type:"number",title:"反向有功总电量",default:-1},reverseTotalReactivePower:{description:"反向无功总电量",type:"number",title:"反向无功总电量",default:-1},toDeliverData:{description:"下发数据",type:"string",title:"下发数据"}}}}},xi={},Af=me(xi,DV,SV,TV,kV),Ci=e.defineComponent({name:"FSmokeDetector",props:xi,emits:[""],setup(t){return()=>e.createVNode("div",{class:"f-smoke-detector"},[e.createVNode("img",{title:"smoke-detector",src:"./image/smoke-detector-2.png"},null)])}}),AV=e.defineComponent({name:"FSmokeDetectorDesign",props:xi,emits:[""],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{ref:o,class:"f-smoke-detector"},[e.createVNode("img",{title:"smoke-detector",src:"../image/smoke-detector-2.png"},null)])}}),$f={install(t){t.component(Ci.name,Ci)},register(t,n,o){t["smoke-detector"]=Ci,n["smoke-detector"]=Af},registerDesigner(t,n,o){t["smoke-detector"]=AV,n["smoke-detector"]=Af}},$V=new Map([["appearance",ge]]);function EV(t,n,o){const a=t.getSchemaByType("splitter-pane");return a.appearance={class:"f-col-w6 f-page-content-nav"},a.position="left",n.contents.unshift(a),n}function BV(t,n,o){const a=t.getSchemaByType("splitter-pane");return a.appearance={class:"f-page-content-main"},a.position="main",n.contents.push(a),n}function FV(t,n,o){const a=o.parentComponentInstance;return String(a.schema.appearance.class||"").split(" ").includes("f-page-main")&&(n.appearance={class:"f-page-content"}),EV(t,n),BV(t,n),n}const IV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter.schema.json",title:"splitter",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},direction:{description:"",type:"string",default:"column",enum:["column","row"]}}},MV={title:"splitter",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},wi={direction:{Type:String,default:"column"}},Ef=me(wi,IV,$V,FV,MV);function Bf(t){const n=e.ref(-1),o=e.ref(-1),a=e.ref(0),r=e.ref(0),i=e.ref(!1),s=e.ref(!1),l=e.computed(()=>({display:i.value?"block":"none",left:`${a.value}px`})),p=e.computed(()=>({display:s.value?"block":"none",top:`${r.value}px`})),c=e.computed(()=>({display:s.value||i.value?"block":"none"}));function f(d){const m=t.value;if(m){const{left:g}=m.getBoundingClientRect();a.value=d.clientX-g}}function u(d){const m=t.value;if(m){const{top:g}=m.getBoundingClientRect();r.value=d.clientY-g}}return{horizontalResizeHandleStyle:l,verticalResizeHandleStyle:p,resizeOverlayStyle:c,showHorizontalResizeHandle:i,showVerticalResizeHandle:s,horizontalResizeBarPosition:n,verticalResizeBarPosition:o,verticalResizeHandleOffset:r,horizontalResizeHandleOffset:a,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:u}}const Vi=e.defineComponent({name:"FSplitter",props:wi,emits:[],setup(t,n){const o=e.ref(),a=Bf(o),{horizontalResizeHandleStyle:r,verticalResizeHandleStyle:i,resizeOverlayStyle:s}=a;e.provide("splitter",{useResizeHandleComposition:a});const l=e.computed(()=>({"flex-direction":t.direction==="row"?"column":"row"}));return()=>e.createVNode("div",{class:"f-splitter",ref:o,style:l.value},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-splitter-resize-overlay",style:s.value},null),e.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:r.value},null),e.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:i.value},null)])}}),OV=new Map([["appearance",ge]]),PV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter-pane.schema.json",title:"splitter-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},height:{description:"",type:"number"},position:{description:"",type:"string",default:"",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},width:{description:"",type:"number"},visible:{description:"",type:"number",default:!0}}},_V={title:"splitter-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}},width:{description:"",type:"number",title:"宽度"},height:{description:"",type:"number",title:"高度"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{collapsable:{description:"",type:"boolean",title:"允许收折"},position:{description:"",type:"enum",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}},resizeable:{description:"",type:"boolean",title:"允许调整尺寸"},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},Ni={customClass:{type:String,defaut:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:200},minHeight:{type:Number,default:200}},Ff=me(Ni,PV,OV,void 0,_V);function If(t,n){const o=e.ref(t.width),a=e.ref(t.height),{horizontalResizeBarPosition:r,horizontalResizeHandleOffset:i,showHorizontalResizeHandle:s,showVerticalResizeHandle:l,verticalResizeBarPosition:p,verticalResizeHandleOffset:c,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:u}=n;let d="",m,g;function h(b){if((d==="left"||d==="right")&&g){const{left:x}=g.getBoundingClientRect(),{width:C}=m.getBoundingClientRect(),w=b.clientX-x,V=d==="left"?(C||0)+(w-r.value):(C||0)-(w-r.value);o.value=t.minWidth>0?Math.max(t.minWidth,V):V}if((d==="top"||d==="bottom")&&g){const{top:x}=g.getBoundingClientRect(),{height:C}=m.getBoundingClientRect(),w=b.clientY-x,V=d==="top"?(C||0)+(w-p.value):(C||0)-(w-p.value);a.value=t.minHeight>0?Math.max(t.minHeight,V):V}i.value=0,c.value=0,r.value=-1,p.value=-1,s.value=!1,l.value=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h),document.body.style.userSelect="",d="",m=null,g=null}function y(b,x,C){if(d=x,m=C,s.value=!0,g=b.composedPath().find(V=>V.className.split(" ")[0]==="f-splitter"),g){const{left:V}=g.getBoundingClientRect();i.value=b.clientX-V,r.value=b.clientX-V,document.addEventListener("mousemove",f),document.addEventListener("mouseup",h),document.body.style.userSelect="none"}}function v(b,x,C){if(d=x,m=C,l.value=!0,g=b.composedPath().find(V=>V.className.split(" ")[0]==="f-splitter"),g){const{top:V}=g.getBoundingClientRect();c.value=b.clientY-V,p.value=b.clientY-V,document.addEventListener("mousemove",u),document.addEventListener("mouseup",h),document.body.style.userSelect="none"}}return{actualWidth:o,actualHeight:a,onClickSplitterHorizontalResizeBar:y,onClickSplitterVerticalResizeBar:v}}const Si=e.defineComponent({name:"FSplitterPane",props:Ni,emits:[],setup(t,n){const o=e.ref(),a=e.inject("splitter"),{useResizeHandleComposition:r}=a,i=If(t,r),{actualHeight:s,actualWidth:l,onClickSplitterHorizontalResizeBar:p,onClickSplitterVerticalResizeBar:c}=i,f=e.ref(t.position),u=e.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-column":f.value==="left"||f.value==="right","f-splitter-pane-row":f.value==="bottom"||f.value==="top","f-splitter-pane-main":f.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((y,v)=>(y[v]=!0,y),h),h}),d=e.computed(()=>{const h={};return(l.value&&f.value==="left"||f.value==="right")&&(h.width=`${l.value}px`),(s.value&&f.value==="bottom"||f.value==="top")&&(h.height=`${s.value}px`),h}),m=e.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":f.value==="left","f-splitter-resize-bar-n":f.value==="bottom","f-splitter-resize-bar-s":f.value==="top","f-splitter-resize-bar-w":f.value==="right"}));function g(h,y){(y==="left"||y==="right")&&p(h,y,o.value),(y==="top"||y==="bottom")&&c(h,y,o.value)}return()=>e.createVNode("div",{ref:o,class:u.value,style:d.value},[n.slots.default&&n.slots.default(),e.createVNode("span",{class:m.value,onMousedown:h=>g(h,f.value)},null)])}});function RV(t,n){function o(){return!1}return{canAccepts:o}}const LV=e.defineComponent({name:"FSplitterDesign",props:wi,emits:[],setup(t,n){var u;const o=e.ref(),a=e.inject("design-item-context"),r=RV(a.schema,(u=a.parent)==null?void 0:u.schema),i=ye(o,a,r);i.value.canNested=!1;const s=Bf(o),{horizontalResizeHandleStyle:l,verticalResizeHandleStyle:p,resizeOverlayStyle:c}=s;e.provide("splitter",{useResizeHandleComposition:s});const f=e.computed(()=>({"flex-direction":t.direction==="row"?"column":"row"}));return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{class:"f-splitter",ref:o,style:f.value},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-splitter-resize-overlay",style:c.value},null),e.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:l.value},null),e.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:p.value},null)])}});function HV(t,n){function o(r){var p;if(!Rt().basalDragulaRuleForContainer(r))return!1;if(((((p=t.appearance)==null?void 0:p.class)||"").split(" ")||[]).includes("f-page-content-nav")){const c=t.contents&&t.contents[0];return!(c&&c.type==="component")}return!0}function a(r,i,s){const l=t,c=(l.appearance&&l.appearance.class||"").split(" ");if(l.position==="main"&&c.includes("f-page-content-main")){if(s.type==="tabs"){const f=s.appearance&&s.appearance.class?String(s.appearance.class).split(" "):[];f.unshift("f-tabs-in-card"),s.appearance={class:f.join(" ")};const u=lt("section");u.id=`${s.id}-section`,u.appearance={class:"f-section-tabs f-section-in-mainsubcard"},u.contents=[s];const d=lt("content-container");return d.id=`${s.id}-struct-wrapper`,d.appearance={class:"f-struct-wrapper"},d.contents=[u],d}if(s.type==="section"){const f=s.appearance&&s.appearance.class?String(s.appearance.class).split(" "):[];f.unshift("f-section-in-main"),s.appearance={class:f.join(" ")},s.title=String(r.innerText);const u=lt("content-container");return u.id=`${s.id}-struct-wrapper`,u.appearance={class:"f-struct-wrapper"},u.contents=[s],u}}return s}return{canAccepts:o,onAcceptNewChildElement:a}}const jV=e.defineComponent({name:"FSplitterPaneDesign",props:Ni,emits:[],setup(t,n){var g;const o=e.ref(),a=e.inject("design-item-context"),r=HV(a.schema,(g=a.parent)==null?void 0:g.schema),i=ye(o,a,r);i.value.styles="padding:0;box-shadow:none;",i.value.canNested=!1,i.value.canMove=!1,i.value.canDelete=!1,e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const s=e.inject("splitter"),{useResizeHandleComposition:l}=s,p=If(t,l),{actualHeight:c,actualWidth:f}=p,u=e.ref(t.position),d=e.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-column":u.value==="left"||u.value==="right","f-splitter-pane-row":u.value==="bottom"||u.value==="top","f-splitter-pane-main":u.value==="center","f-component-splitter-pane":!0,"drag-container":!0};return t.customClass&&String(t.customClass).split(" ").reduce((y,v)=>(y[v]=!0,y),h),h}),m=e.computed(()=>{const h={};return(f.value&&u.value==="left"||u.value==="right")&&(h.width=`${f.value}px`),(c.value&&u.value==="bottom"||u.value==="top")&&(h.height=`${c.value}px`),h});return()=>e.createVNode("div",{ref:o,"data-dragref":`${a.schema.id}-container`,class:d.value,style:m.value},[n.slots.default&&n.slots.default()])}}),Mf={install(t){t.component(Vi.name,Vi),t.component(Si.name,Si)},register(t,n,o){t.splitter=Vi,n.splitter=Ef,t["splitter-pane"]=Si,n["splitter-pane"]=Ff},registerDesigner(t,n,o){t.splitter=LV,n.splitter=Ef,t["splitter-pane"]=jV,n["splitter-pane"]=Ff}},WV=new Map([["appearance",ge]]);function qV(t,n,o){return n}const zV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},GV={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Ti={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},Of=me(Ti,zV,WV,qV,GV),Di=e.defineComponent({name:"FStep",props:Ti,emits:["click"],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),r=e.ref(t.height),i=e.ref(t.steps),s=e.ref(t.clickable),l=e.ref(0),p=e.ref(t.activeIndex),c=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),f=e.computed(()=>({height:o.value==="vertical"?`${r.value}px`:""}));function u(V,N){const S={step:!0,active:N===p.value,clickable:s.value,current:N===p.value};return N<p.value&&(S.finish=!0),S}function d(V,N){const S={step:V,stepIndex:N};n.emit("click",S)}function m(V,N){const S={"f-progressstep-row":!0,"step-active":N===p.value,"step-current":N===p.value};return N<p.value&&(S["step-finish"]=!0),S}function g(V,N){return{"step-icon":!0,"step-success":N,"f-icon":N,"f-icon-check":N}}function h(V,N){const S=[];return N>=p.value||N===l.value?S.push(e.createVNode("span",{class:"step-icon"},[N+1])):S.push(e.createVNode("span",{class:g(V,!0)},null)),S}function y(V,N){return{"step-name":!0,"step-name-success":N<p.value}}function v(V,N){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:y(V,N)},[V.title])])}function b(V,N){return{"f-progress-step-line":!0,"f-progress-step-line-success":N===p.value}}function x(V,N){return N!==i.value.length-1}const C=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function w(){return i.value.map((V,N)=>e.createVNode("li",{class:u(V,N),onClick:S=>d(V,N)},[e.createVNode("div",{class:m(V,N)},[e.createVNode("div",{class:"f-progress-step-content"},[h(V,N),v(V,N)]),x(V,N)&&e.createVNode("div",{class:b(V,N)},[e.createVNode("span",{class:C.value},null)])])]))}return e.watch(()=>t.activeIndex,()=>{t.activeIndex>-1&&t.activeIndex<=i.value.length&&(p.value=t.activeIndex,w())}),()=>e.createVNode("div",{class:"f-progress-step"},[e.createVNode("ul",{class:c.value,style:f.value},[w()])])}}),UV=e.defineComponent({name:"FStepDesign",props:Ti,emits:[],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),r=e.ref(t.height),i=e.ref(t.steps),s=e.ref(0),l=e.ref(t.clickable),p=e.ref(0),c=e.ref(),f=e.inject("design-item-context"),u=ye(c,f);e.onMounted(()=>{c.value.componentInstance=u}),n.expose(u.value);const d=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),m=e.computed(()=>({height:o.value==="vertical"?`${r.value}px`:""}));function g(D,k){const A={step:!0,active:k===s.value,clickable:l.value,"click-disable":D.disable,current:k===s.value};return k<s.value&&(A.finish=!0),D.status&&(A[D.status]=!0),D.hasOwnProperty("class")&&D.class.split(" ").reduce(($,T)=>($[T]=!0,$),A),A}function h(D,k){}function y(D,k){const A={"f-progressstep-row":!0,"step-active":k===s.value,"step-current":k===s.value};return k<s.value&&(A["step-finish"]=!0),D.status&&(A["step-"+D.status]=!0),A}function v(D,k){const A={"step-icon":!0,"step-success":k,"k-icon":k,"k-i-check":k};return D.hasOwnProperty("icon")&&D.class.split(" ").reduce(($,T)=>($[T]=!0,$),A),A}function b(D,k){const A=[];return D.icon?A.push(e.createVNode("span",{class:v(D,!1)},null)):k>=s.value||k===p.value?A.push(e.createVNode("span",{class:"step-icon"},[k+1])):A.push(e.createVNode("span",{class:v(D,!0)},null)),A}function x(D,k){return{"step-name":!0,"step-name-success":k<s.value}}function C(D,k){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:x(D,k)},[D.title])])}function w(D,k){return{"f-progress-step-line":!0,"f-progress-step-line-success":k===s.value}}function V(D,k){return k!==i.value.length-1}const N=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function S(){return i.value.map((D,k)=>e.createVNode("li",{class:g(D,k),onClick:A=>void 0},[e.createVNode("div",{class:y(D,k)},[e.createVNode("div",{class:"f-progress-step-content"},[b(D,k),C(D,k)]),V(D,k)&&e.createVNode("div",{class:w(D,k)},[e.createVNode("span",{class:N.value},null)])])]))}return()=>e.createVNode("div",{ref:c,class:"f-progress-step"},[e.createVNode("ul",{class:d.value,style:m.value},[S()])])}}),Pf={install(t){t.component(Di.name,Di)},register(t,n,o){t.step=Di,n.step=Of},registerDesigner(t,n,o){t.step=UV,n.step=Of}},YV=e.defineComponent({name:"FSwitchDesign",props:mi,emits:["update:modelValue"],setup(t,n){const{disable:o,size:a,onLabel:r,offLabel:i}=e.toRefs(t),s=e.ref(t.modelValue),l=e.ref(),p=e.inject("design-item-context"),c=ye(l,p);e.onMounted(()=>{l.value.componentInstance=c}),n.expose(c.value);function f(){return""}function u(){return""}function d(){return""}const m=e.computed(()=>({switch:!0,"f-cmp-switch":!0,checked:s.value,disabled:o.value,"switch-large":a.value==="large","switch-medium":a.value==="medium","switch-small":a.value==="small"})),g=e.computed(()=>({outline:"none","backgroud-color":f(),"border-color":u()})),h=e.computed(()=>({background:d()})),y=e.computed(()=>(r==null?void 0:r.value)||(i==null?void 0:i.value));function v(x,C=!0){o.value||(s.value=!s.value,n.emit("update:modelValue",s.value))}function b(x){v()}return()=>e.createVNode("span",{ref:l,tabindex:"0",role:"button",class:m.value,style:g.value,onClick:b},[y.value&&e.createVNode("span",{class:"switch-pane"},[e.createVNode("span",{class:"switch-label-checked"},[r==null?void 0:r.value]),e.createVNode("span",{class:"switch-label-unchecked"},[i==null?void 0:i.value])]),e.createVNode("small",{style:h.value},[n.slots.default&&n.slots.default()])])}}),_f={install(t){t.component(jo.name,jo)},register(t,n,o){t.switch=jo,n.switch=Cf},registerDesigner(t,n,o){t.switch=YV,n.switch=Cf}};function ZV(t,n,o,a,r){const{activeId:i,removeTab:s,selectTab:l,removeDesignTab:p,selectDesignTab:c}=r,f=e.computed(()=>({"st-tab-text":!0,"farris-title-auto":t.autoTitleWidth})),u=e.computed(()=>{const S={"farris-component":!0,"nav-item":!0,"d-none":n.show!==void 0?!n.show:!1,"f-state-active":n.id===i.value,"f-state-disable":n.disabled};return S[`${n.id}-design-item`]=!0,S}),d=e.computed(()=>({width:`${n.tabWidth}px`})),m=e.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:n.id===i.value,disabled:n.disabled}));function g(S){return e.createVNode("span",{class:f.value,title:S.title},[S.title])}function h(S){return S.slots.title?S.slots.title:g}const y=h(o),v=e.ref(n.removeable);function b(){return e.createVNode("span",{class:"st-drop-close",onClick:S=>s(S,n.id)},[e.createVNode("i",{class:"f-icon f-icon-close"},null)])}function x(S){l(n.id),t.tabType==="one-page"&&a.scrollToByPaggId(n.id)}function C(S){c(S,n.id)}function w(S){Io.question(`确定删除标签页【${o.props.title}】?`,"",()=>p(S,n.id),()=>{})}function V(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:S=>w(S)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function N(){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[V()])])}return e.createVNode("li",{onClick:S=>C(S),class:u.value,style:d.value,id:`${n.id}-design-item`},[N(),e.createVNode("a",{class:m.value,onClick:x},[y(n),v.value&&b()])])}function KV(t,n,o,a,r,i,s){const{shouldShowNavigationButtons:l}=o,{tabPages:p}=r,c=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":l.value})),f=e.computed(()=>({width:"100%","justify-content":t.justifyContent})),u=e.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":t.fill||t.tabType==="fill","nav-pills":t.tabType==="pills","flex-row":t.position==="top"||t.position==="bottom","flex-column":t.position==="left"||t.position==="right"})),d=e.computed(()=>({overflow:"auto"}));function m(h){const{componentType:y}=h;let v=lt(y,h);s&&s.onResolveNewComponentSchema&&(v=s.onResolveNewComponentSchema(h,v));const b=y.toLowerCase().replace("-","_");return v&&!v.id&&v.type===y&&(v.id=`${b}_${Math.random().toString().slice(2,6)}`),v}const g=function(h){var x;const y={componentType:"tab-page",label:"Tab1",parentComponentInstance:i.value,targetPosition:-1},v=m(y);(x=i.value.schema.contents)==null||x.push(v);const{selectTabByTabId:b}=r;b(v.id)};return()=>e.createVNode("div",{class:c.value,style:f.value},[e.createVNode("ul",{class:u.value,style:d.value,ref:n},[p.value.map(h=>ZV(t,h.props,h,a,r)),e.createVNode("li",{class:"nav-item"},[e.createVNode("a",{class:"nav-link tabs-text-truncate",title:"添加页签",onClick:h=>g()},[e.createVNode("i",{class:"f-icon f-icon-plus",style:"font-size: 20px;margin: 0 auto;line-height: 24px;"},null)])])])])}function QV(t,n){const o=ln();let a=!1,r,i=!1;function s(u){return!1}function l(){return!i}function p(){return!i}function c(){return a}function f(){const u=t,d=u.appearance&&u.appearance.class||"",m=d?d.split(" "):[],g=n==null?void 0:n.schema,h=g&&g.appearance&&g.appearance.class||"",y=h?h.split(" "):[],v=u.contents||[],b=v.length?v[0]:null,x=b&&b.appearance&&b.appearance.class||"",C=x?x.split(" "):[],w=v.length?v.reduce((A,$)=>{const T=$&&$.appearance?$.appearance.class:"",E=T?T.split(" "):[];return A.push(...E),A},[]):[],V=(n==null?void 0:n.parent)&&n.parent.schema,N=V&&V.appearance&&V.appearance.class||"";N&&N.split(" "),r={componentClass:d,componentClassList:m,childContents:v,firstChildContent:b,firstChildClass:x,firstChildClassList:C,parent,parentClass:h,parentClassList:y,children:v,childrenClassList:w};const{canAccept:S,fixed:D,hidePadding:k}=o.getRuleValue(m[0],r);return a=k,i=D,!0}return{canAccepts:s,checkCanDeleteComponent:l,checkCanMoveComponent:p,hideNestedPaddingInDesginerView:c,resolveComponentContext:f}}function XV(t,n,o,a){const r=e.ref([]),i=e.ref(t.activeId||""),s=e.ref(!0),l=e.ref(),p=e.ref([]);function c(T){const E=T.value.findIndex(B=>B.props.show!==!1&&!i.value&&!B.props.disabled);!i.value&&E!==-1&&(i.value=T.value[E].props.id)}function f(T,E){T.classList.contains(E)||T.classList.add(E)}function u(T,E){T.classList.remove(E)}function d(T){const{parentElement:E}=T;E&&(T.scrollWidth>E.offsetWidth?f(T,"farris-title-text-custom"):u(T,"farris-title-text-custom"))}function m(T){var B;if(t.autoTitleWidth)return;const E=(B=T.value)==null?void 0:B.querySelectorAll(".st-tab-text");E&&E.forEach(I=>d(I))}const g=T=>{T.preventDefault(),T.stopPropagation()};function h(T){r.value=r.value.filter(E=>E.props.id!==T),i.value===T&&(i.value="",c(r))}function y(T,E,B=!1){const I=r.value.findIndex(F=>F.props.id===E);h(E),g(T),e.nextTick(()=>{m(o),B&&(s.value=!0),n.emit("tabRemove",{removeIndex:I,removeId:E,activeId:i.value})})}function v(){const T=r.value.find(I=>I.props.id===i.value);p.value=[],T&&T.props.toolbar&&T.props.toolbar.buttons&&T.props.toolbar.buttons.length&&(p.value=[...T.props.toolbar.buttons]);const E=a.schema.contents,B=E==null?void 0:E.find(I=>I.id===i.value);l.value=B==null?void 0:B.toolbar}function b(T){const E=i.value;i.value=T,v(),n.emit("tabChange",{prevId:E,nextId:i.value})}function x(T){b(T)}function C(T){r.value.findIndex(B=>B.props.id===T.props.id)===-1&&r.value.push(T)}function w(T){r.value.findIndex(B=>B.props.id===T.props.id)!==-1&&(r.value.forEach(B=>{B.props.id===T.props.id&&(B=T)}),e.nextTick(()=>{m(o)}))}function V(T){T&&(T.stopPropagation(),T.preventDefault())}function N(T,E){V(T);const B=a.schema.contents,I=B==null?void 0:B.findIndex(F=>F.id===E);I===-1||I===void 0||(B==null||B.splice(I,1),h(E))}function S(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(E=>E.classList.remove("dgComponentFocused"));const T=document.getElementsByClassName("dgComponentSelected");Array.from(T).forEach(E=>E.classList.remove("dgComponentSelected"))}function D(T){T.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function k(T){var F;const{contents:E=[]}=a.schema,B=E==null?void 0:E.findIndex(R=>R.id===T),I=E[B];(F=a==null?void 0:a.setupContext)==null||F.emit("selectionChange",I.type,I)}function A(T,E){S(),V(T),D(T),k(E)}function $(T,E){S(),V(T),D(T)}return{activeId:i,addTab:C,changeTitleStyle:m,removeTab:y,selectTab:x,selectTabByTabId:b,tabPages:r,updateTab:w,toolbarItems:p,removeDesignTab:N,selectDesignTab:A,selectDesignTabToolbar:$,toolbarSchema:l}}function JV(t,n,o,a){const{toolbarItems:r,toolbarSchema:i}=t,s=p=>{};function l(p,c){var f;(f=a.setupContext)==null||f.emit("selectionChange",p,c)}return e.createVNode("div",{class:"farris-tabs-toolbar"},[e.createVNode("div",{class:"farris-tabs-inline-flex"},[e.createVNode(Gu,{modelValue:i.value,"onUpdate:modelValue":p=>i.value=p,canAdd:!0,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",onSelectionChange:l},{default:()=>[e.createVNode(ei,{items:r.value,onClick:s},null)]})])])}const eN=e.defineComponent({name:"FTabsDesign",props:ma,emits:["tabChange","tabRemove"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=QV(a.schema,a.parent),i=ye(o,a,r),s=e.ref(t.tabType),l=e.shallowRef(),p=e.shallowRef(),c=XV(t,n,l,a),{activeId:f,changeTitleStyle:u,tabPages:d,addTab:m,updateTab:g,selectTabByTabId:h,toolbarItems:y}=c,v=Bl(t,p,c),b=$l(t,l,v,c),{previousButtonClass:x,nextButtonClass:C,nextButtonGroupClass:w,scrollTab:V,updateNavigationLayout:N}=b,S=El(t,c),{hideDropDown:D}=S,k=KV(t,l,b,v,c,i,r),A=k,$=kl(t,l,b,v,c),T=new Map([["default",k],["one-page",A],["pills",$]]);e.computed(()=>{const j=d.value.find(Z=>Z.props.id===f.value);return j==null?void 0:j.slots});const E=e.computed(()=>{const j=d.value.find(U=>U.props.id===f.value);return(j==null?void 0:j.props.toolbarPosition)==="inHead"});e.provide("tabs",{activeId:f,addTab:m,updateTab:g,tabPages:d,tabType:s});function B(){const j=i.value.schema.contents||[];return j.length<1?null:j.find(U=>U.id===f.value)}function I(){var Z;const j=B();y.value=[...(Z=j==null?void 0:j.toolbar)==null?void 0:Z.buttons]}e.provide("toolbar-item-handler",I);const F=e.computed(()=>t.fill||t.tabType==="fill"),R=e.computed(()=>t.tabType==="pills"),O=e.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":E.value,"farris-tabs-inContent":!E.value,"farris-tabs-nav-fill":F.value,"farris-tabs-nav-pills":R.value})),W=e.computed(()=>({width:E.value&&t.titleWidth?`${t.titleWidth}%`:""})),M=e.computed(()=>({"farris-tabs":!0,"flex-column":t.position==="top","flex-column-reverse":t.position==="bottom","flex-row":t.position==="left","flex-row-reverse":t.position==="right","one-page":t.tabType==="one-page"}));e.onMounted(()=>{d.value.length&&(f.value=t.activeId||d.value[0].props.id,h(f.value)),e.nextTick(()=>{N()}),u(l),window.addEventListener("click",j=>{var Z;D.value||(Z=o.value)!=null&&Z.contains(j.target)||(D.value=!0)}),window.addEventListener("resize",()=>{N()}),o.value.componentInstance=i});function _(){return e.createVNode("button",{title:"left-arrow-button",type:"button",class:x.value,onClick:()=>{V(0,-1)}},null)}function H(){return e.createVNode("button",{title:"right-arrow-button",type:"button",class:C.value,onClick:()=>{V(0,1)}},null)}const{renderMorePagesButtton:L}=Al(t,S,b,c);function G(){return!!y.value.length&&JV(c,i,r,a)}const Y=T.get(t.tabType)||T.get("default");function z(){var j,Z,U,X;return e.createVNode("div",{class:O.value},[e.createVNode("div",{class:"farris-tabs-header-pre"},[(Z=(j=n.slots).headerPrefix)==null?void 0:Z.call(j)]),e.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:W.value},[_(),Y&&Y(),e.createVNode("div",{class:w.value},[H(),L()])]),G(),e.createVNode("div",{class:"farris-tabs-header-post"},[(X=(U=n.slots).headerSuffix)==null?void 0:X.call(U)])])}function q(){var j,Z;return e.createVNode("div",{class:"farris-tabs-content",ref:p},[(Z=(j=n.slots).default)==null?void 0:Z.call(j)])}return n.expose(i.value),()=>e.createVNode("div",{class:M.value,ref:o},[z(),q()])}});function tN(t,n){function o(r){return!!Rt().basalDragulaRuleForContainer(r)}function a(r){}return{canAccepts:o,onAcceptMovedChildElement:a}}function nN(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const oN=e.defineComponent({name:"FTabPageDesign",props:va,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=tN(a.schema,a.parent),i=ye(o,a,r);i.value.canNested=!1,i.value.canDelete=!1,i.value.canMove=!1,n.expose(i.value);const s=e.inject("tabs"),l=e.ref(!0),p={slots:n.slots,props:t},c=e.ref((s==null?void 0:s.tabType.value)||"default");function f(){t.id===s.activeId.value?a.designerItemElementRef.value.classList.remove("d-none"):a.designerItemElementRef.value.classList.add("d-none")}e.onMounted(()=>{o.value.componentInstance=i;const y=s.tabPages.value.findIndex(v=>v.props.id===t.id);!y||y===-1?s==null||s.addTab(p):y>-1&&(l.value=!1,console.warn(`已经存在id为${t.id}的页签啦`)),f()}),e.onUnmounted(()=>{});const u=e.computed(()=>({display:(t==null?void 0:t.id)===(s==null?void 0:s.activeId.value)?"":"none"}));e.watch(()=>t,y=>{s==null||s.updateTab({props:y,slots:n.slots})},{immediate:!0,deep:!0}),e.watch(s.activeId,f);function d(){var v,b;const y=(b=(v=n.slots).default)==null?void 0:b.call(v);return e.createVNode(Sn,{"main-title":t.title,class:"farris-tab-page"},nN(y)?y:{default:()=>[y]})}function m(){var v,b;const y=(b=(v=n.slots).default)==null?void 0:b.call(v);return e.createVNode("div",{ref:o,class:"farris-tab-page drag-container","data-dragref":`${a.schema.id}-container`,style:u.value},[y])}const h=new Map([["default",m],["one-page",d]]).get(c.value)||m;return()=>l.value?h():null}}),Rf={install(t){t.component(eo.name,eo),t.component(sn.name,sn)},register(t,n,o){t.tabs=eo,t["tab-page"]=sn,n.tabs=Sl,n["tab-page"]=_l},registerDesigner(t,n,o){t.tabs=eN,t["tab-page"]=oN,n.tabs=Sl,n["tab-page"]=_l}},aN=e.defineComponent({name:"FTagsDesign",props:Ha,emits:["remove","selectionChange","change"],setup(t,n){const o=e.ref(t.selectable),a=e.ref(t.customClass),r=e.ref(t.data),i=e.ref(t.tagType),s=e.ref(t.tagStyle),l=e.ref(t.showColor),p=e.ref(t.activeTag),c=e.ref(t.customStyle),f=e.ref(t.showClose),u=e.ref(t.showAddButton),d=e.ref(t.showInput),m=e.ref(t.addButtonText),g=e.ref(t.enableAddButton);e.ref(t.placeholder),e.ref(""),e.ref();const h=e.ref(),y=e.ref(t.wrapText),v=e.ref(),b=e.ref(),x=e.inject("design-item-context"),C=ye(b,x);e.onMounted(()=>{b.value.componentInstance=C}),n.expose(C.value);function w(){const ee=r.value.map(K=>({type:"Tag",payload:K}));return u.value&&ee.push({type:"AddButton"}),ee}const V=e.ref(w());function N(ee){r.value=ee,V.value=w()}const S=e.computed(()=>V.value.findIndex(ee=>ee.type==="Input")),D=$c(t,n,r,V),{dragstart:k,dragenter:A,dragover:$,dragend:T}=D;e.watch(()=>t.data,ee=>N(ee));const E=e.computed(()=>{const ee={"farris-tags":!0,"farris-tags-checkable":o.value,"farris-tags-nowrap":!y.value};return a.value.split(" ").reduce((K,se)=>(K[se]=!0,K),ee),ee});function B(ee){const K={"farris-tag-item":!0,"farris-tag-item-checked":o.value&&ee.checked,"farris-tag-item-checkable":o.value,"farris-tag-item-has-color":l.value,"farris-tag-item-actived":p.value===ee.name};if(i.value){const se=`farris-tag-item-${i.value}`;K[se]=!0}return K}const I=e.computed(()=>{const ee={};return c.value&&c.value.split(";").reduce((K,se)=>{const ue=se.split(":");return K[ue[0]]=ue[1],K},ee),ee});function F(ee,K){o.value&&K.selectable&&(K.checked=!K.checked,p.value=K.checked?K.name:"",K.checked&&r.value.filter(se=>se.name!==K.name).forEach(se=>{se.checked=!K.checked}),n.emit("change",r.value),n.emit("selectionChange",K))}function R(ee,K){let se;switch(ee.key){case"Backspace":r.value=r.value.filter(ue=>ue.name!==K.name),n.emit("change",r.value);break;case"ArrowLeft":se=Math.max(h.value.scrollLeft+20,0),h.value.scrollLeft=se;break;case"ArrowRight":se=Math.max(h.value.scrollLeft-20,0),h.value.scrollLeft=se}}function O(ee,K){const se=r.value.findIndex(ue=>ue.name===K.name);if(se>-1){const[ue]=r.value.splice(se,1);V.value=w(),n.emit("change",r.value),n.emit("remove",r.value,ue,se)}ee.stopPropagation()}const W=e.computed(()=>({"farris-tag-item":!0,"farris-tag-add-button":!0,"farris-tag-add-button-disabled":!g.value}));function M(ee){}function _(){return e.createVNode("li",{class:W.value,onClick:ee=>void 0},[e.createVNode("span",{class:"f-icon f-icon-amplification"},null),e.createVNode("span",{class:"farris-tag-add-text"},[m.value])])}function H(ee){if(ee&&!ee.innerText){const K=S.value;if(K>0){const[se]=r.value.splice(K-1,1);V.value.splice(K-1,1),n.emit("remove",r.value,se,K-1)}}}function L(ee,K,se){ee>-1&&(r.value.splice(ee,0,{name:K,value:se,selectable:o.value}),V.value=w(),n.emit("change",r.value))}function G(ee){if(ee&&ee.innerText){const K=ee.innerText,se=S.value;L(se,K,K),ee.innerText=""}}function Y(ee){const K=ee.target;K&&(K.innerText?G(K):n.emit("change",r.value))}function z(ee){ee.key==="Enter"&&G(ee.target),ee.key==="Backspace"&&(H(ee.target),e.nextTick(()=>{v.value&&v.value.focus()}))}function q(){return e.createVNode("li",{class:"farris-tag-input-box"},[e.createVNode("div",{ref:v,class:"form-control",contenteditable:"true",onKeyup:z,onBlur:Y},null)])}function j(ee,K){return e.createVNode("li",{class:B(ee),style:I.value,tabindex:0,id:ee.name,key:ee.name,onClick:se=>F(se,ee),onKeydown:se=>R(se,ee),draggable:"true",onDragstart:se=>k(se,ee,K),onDragenter:se=>A(se,K),onDragend:se=>T(se,ee),onDragover:se=>$(se,K)},[e.createVNode("div",{title:ee.name,class:"tag-box"},[ee.name]),f.value&&e.createVNode("span",{class:"tag-delete"},[e.createVNode("i",{class:"f-icon f-icon-close",onClick:se=>O(se,ee)},null)])])}function Z(){return V.value.map((ee,K)=>{switch(ee.type){case"Tag":return j(ee.payload,K);case"AddButton":return _();case"Input":return q()}})}const U=e.computed(()=>({"farris-tags-item-container":!0,"farris-tag-item-capsule":s.value==="capsule"}));function X(ee){const K=Math.max(h.value.scrollLeft-ee.deltaX,0);h.value.scrollLeft=K}function ie(ee){const K=h.value,se=r.value.length-1;if(K){const ue=Array.from(K.children).filter(Te=>Te.className.indexOf("farris-tag-item")>-1).findIndex(Te=>{const ke=Te.getBoundingClientRect(),_e=window.getComputedStyle(Te),te=parseInt(_e["margin-left"],10)+ke.width+parseInt(_e["margin-right"],10);return ke.left+te>ee});if(ue>-1)return ue}return se}function de(ee){if(d.value){const se=ie(ee.clientX)+1,Te=V.value.filter(ke=>ke.type!=="Input");Te.splice(se,0,{type:"Input"}),V.value=Te,e.nextTick(()=>{v.value&&v.value.focus()})}}function ne(ee){var se;ee.preventDefault(),ee.stopPropagation();const K=(se=ee.dataTransfer)==null?void 0:se.getData("Text");if(K){const ue=K.split(":"),Te=ue[0],ke=ue[1];[...r.value].findIndex(ce=>(console.log(`${ce.value} === ${ke} is ${ce.value===ke}`),ce.value===ke))>-1||L(r.value.length,Te,ke)}}function oe(ee){ee.preventDefault()}return()=>e.createVNode("div",{ref:b,class:E.value,onClick:de,onDrop:ne,onDragover:oe},[e.createVNode("ul",{ref:h,class:U.value,onWheel:ee=>X(ee)},[Z()])])}}),Lf={install(t){t.component(so.name,so)},register(t,n,o){t.tags=so,n.tags=Ac},registerDesigner(t,n,o){t.tags=aN,n.tags=Ac}},rN=new Map([["appearance",ge]]);function iN(t,n,o){return n}const sN={title:"text",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},lN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/text.schema.json",title:"text",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for text",type:"string"},type:{description:"The type string of text",type:"string",default:"text"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},ki={modelValue:{type:[String,Number,Boolean],default:""},password:{type:Boolean,default:!1},textarea:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1},dateRange:{type:Boolean,default:!1},maxHeight:{type:Number,default:0},height:{type:Number,default:0},type:{type:String,default:"string"},format:{type:String,default:""},enumConvertedDatas:{default:void 0},groupSeparator:{type:String,default:","},decimalSeparator:{type:String,default:"."},decimalFilledSymbol:{type:String,default:"0"},numberOptions:{type:Object,default:void 0},amountExpression:{type:String,default:"%s%v"},textField:{type:String,default:"name"},valueField:{type:String,default:"value"},textAlign:{type:String,default:""},dateRangeDelimiter:{type:String,default:"~"},enumDelimiter:{type:String,default:","}},Hf=me(ki,lN,rN,iN,sN);function cN(t){let n;return/Y/g.test(t)===!0?n=t.replace(/Y/g,"y"):n=t,/D/g.test(n)===!0&&(n=n.replace(/D/g,"d")),n}function dN(t,n,o,a,r){if(t==null||t==="")return"";if(n&&n.length){const i=(""+t).split(o),s=[];for(let l=0;l<i.length;l++){const p=n.find(c=>c[r]===i[l]);p?s.push(p[a]):s.push(i[l])}return s.length>0?s.join(o):""}return t}function jf(t,n){let o;return n||(n="YYYY-MM-DD"),n==="timeago"?Gy().formatTo(t):(n==="hh:mm:ss"||n==="HH:mm:ss"?o=t:o=_a().formatTo(t,cN(n)),o)}function uN(t,n){return!t&&!n||n&&n.type&&n.type==="number"&&(n.formatter||(n.useThousands?n.precision!==void 0?t="n"+n.precision:t="n2":n.precision!==void 0?t="f"+n.precision:t="f2")),t}function fN(t){return t.replace(/[a-z]+/g,n=>n.toUpperCase())}function pN(t,n,o){return t.toString().indexOf(".")>-1?(console.warn("十进制转换仅限整型类型"),""):(Array(n).join(o)+t).slice(-n)}function mN(t,n){return Number(t*100).toFixed(Number(n))+"%"}function hN(t,n,o,a,r,i,s){if(!n&&!o)return t.toString();if(o&&o.type&&o.type==="number"&&o.formatter)return o.formatter(t);const l=fN(n.substring(0,1)),p=Number(n.substring(1)),c={};let f;if(!/C|D|F|N|P/g.test(l)){console.log(`不支持format为 ${n} 类型的数字格式化`);return}a&&Object.assign(c,{groupSeparator:a}),r&&Object.assign(c,{decimalSeparator:r}),i&&Object.assign(c,{format:i});const{formatTo:u}=qy();switch(l){case"C":Object.assign(c,{prefix:"¥",precision:p}),f=u(t,c);break;case"D":f=pN(t,p,s);break;case"F":Object.assign(c,{prefix:"",groupSeparator:"",precision:p}),f=u(t,c);break;case"N":Object.assign(c,{prefix:"",precision:p}),f=u(t,c);break;case"P":f=mN(t,p);break}return f}function gN(t){return t===!0?"是":t===!1||t==null||t===""||typeof t>"u"?"否":t}const Ai=e.defineComponent({name:"FText",props:ki,emits:["update:modelValue","valueChange"],setup(t,n){const o=e.ref(t.textarea),a=e.ref(t.password),r=e.ref(t.autoSize),i=e.ref(t.dateRange),s=e.ref(t.type),l=e.ref(t.format),p=e.ref(),c=e.ref(),f=e.ref(""),u=e.computed(()=>({"f-form-control-text":!o.value,"f-form-context-textarea":o,"f-component-text-auto-size":r.value})),d=e.computed(()=>({"text-align":t.textAlign,height:!r.value&&t.height>0?`${t.height}px`:"","min-height":r.value&&t.height>0?`${t.height}px`:"","max-height":r.value&&t.maxHeight>0?`${t.maxHeight}px`:""}));e.onMounted(()=>{if(o.value){const y=c.value.parentElement.className;c.value.parentElement.className=y+" f-cmp-text-is-textarea"}});const m=e.computed(()=>{let y=g(t.modelValue);return p.value!=y&&(n.emit("valueChange",y),p.value=y),y});function g(y){if(a.value)return y?"******":"";if(s.value!=="boolean"&&(y==null||typeof y>"u"))return"";let v="";switch(s.value){case"string":v=y;break;case"date":case"datetime":if(!i.value)v=jf(y,l.value);else{let b=t.dateRangeDelimiter;const x=y.split(b);let C=[];x&&x.length&&x.forEach(w=>{C.push(jf(w,l.value))}),v=C.join(b)}break;case"number":l.value=uN(l.value,t.numberOptions),v=hN(y,l.value,t.numberOptions,t.groupSeparator,t.decimalSeparator,t.amountExpression,t.decimalFilledSymbol);break;case"enum":v=dN(y,t.enumConvertedDatas,t.enumDelimiter,t.textField,t.valueField);break;case"boolean":v=gN(y);break}return v}function h(){const y=c.value;Math.abs(y.scrollWidth-y.clientWidth)>2||Math.abs(y.scrollHeight-y.clientHeight)>2?f.value=m.value:f.value=""}return e.watch(()=>t.modelValue,(y,v)=>{y!==v&&n.emit("update:modelValue",y)}),()=>e.createVNode("span",{class:u.value,style:d.value,ref:c,onMouseenter:()=>h(),title:f.value},[m.value])}}),yN=e.defineComponent({name:"FTextDesign",props:ki,emits:["update:modelValue"],setup(t,n){const o=e.ref(!0),a=e.ref(!0),r=e.ref(""),i=e.ref(0),s=e.ref(0),l=e.ref(t.modelValue),p=e.computed(()=>({"f-form-control-text":!o.value,"f-form-context-textarea":o,"f-component-text-auto-size":a.value})),c=e.computed(()=>({textalign:r.value,height:!a.value&&i.value>0?`${i.value}px`:"","min-height":!a.value&&i.value>0?`${i.value}px`:"","max-height":!a.value&&s.value>0?`${s.value}px`:""}));e.computed(()=>"");const f=e.ref(),u=e.inject("design-item-context"),d=ye(f,u);return e.onMounted(()=>{f.value.componentInstance=d}),n.expose(d.value),()=>e.createVNode("span",{ref:f,class:p.value,style:c.value},[l.value])}}),Wf={install(t){t.component(Ai.name,Ai)},register(t,n,o){t.text=Ai,n.text=Hf},registerDesigner(t,n,o){t.text=yN,n.text=Hf}},bN=new Map([["appearance",ge]]),vN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/time-picker.schema.json",title:"time-picker",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a time picker",type:"string"},type:{description:"The type string of time picker component",type:"string",default:"time-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function xN(t,n,o){return n}const CN={title:"time-picker",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},$i={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},popupClassName:{type:String,default:""},placeholder:{type:String,default:""},defaultOpenValue:{type:Date,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},hideDisabledElements:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0}},qf=me($i,vN,bN,xN,CN),wN={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},defaultOpenValue:{type:Date,default:null},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},hideDisabledElements:{type:Boolean,default:!1}};function qe(t){return typeof t<"u"&&t!==null}function zf(t,n="hh:mm:ss"){if(!(!t||!n))return n.indexOf("ss")===-1&&t.split(":").length===3&&(n=n+":ss"),n.indexOf("A")>-1?(n=n.replace(/A/g,"a"),bc(t.toLowerCase(),n,new Date)):bc(t,n,new Date)}function Gf(t,n="hh:mm:ss",o="AM"){return!t||isNaN(t.getTime())?"":n.indexOf("A")>-1?(n=n.replace(/A/g,"a"),pn(t,n).toUpperCase()):pn(t,n)}function Uf(t,n){let o=t||"hh:mm:ss";return n?(o=o?o.replace(/H/g,"h"):"hh:mm:ss a",o.indexOf("a")===-1&&o.indexOf("A")===-1&&(o=o+" a")):o=o?o.replace(/h/g,"H"):"HH:mm:ss",o}class VN{constructor(){P(this,"hourStep",1);P(this,"minuteStep",1);P(this,"secondStep",1);P(this,"use12Hours",!1);P(this,"changedValue",e.ref({text:"",value:void 0}));P(this,"format","HH:mm:ss");P(this,"temporaryHours");P(this,"temporaryMinutes");P(this,"temporarySeconds");P(this,"temporaryText","");P(this,"temporaryValue");P(this,"temporarySelected12Hours");P(this,"temporaryDefaultOpenValue",new Date)}get hours(){return this.temporaryHours}set hours(n){n!==this.temporaryHours&&(this.use12Hours?this.selected12Hours==="PM"&&n!==12?this.temporaryHours=n+12:this.selected12Hours==="AM"&&n===12?this.temporaryHours=0:this.temporaryHours=n:this.temporaryHours=n,this.update())}get realHours(){return this.temporaryHours}get viewHours(){return this.use12Hours&&qe(this.temporaryHours)?this.calculateViewHour(this.temporaryHours):this.temporaryHours}get minutes(){return this.temporaryMinutes}set minutes(n){n!==this.temporaryMinutes&&(this.temporaryMinutes=n,this.update())}get seconds(){return this.temporarySeconds}set seconds(n){n!==this.temporarySeconds&&(this.temporarySeconds=n,this.update())}get defaultHours(){return this.defaultOpenValue.getHours()}get defaultViewHours(){const n=this.defaultOpenValue.getHours();return this.use12Hours&&qe(n)?this.calculateViewHour(n):n}get defaultRealHours(){return this.defaultOpenValue.getHours()}get defaultMinutes(){return this.defaultOpenValue.getMinutes()}get defaultSeconds(){return this.defaultOpenValue.getSeconds()}get default12Hours(){return this.defaultOpenValue.getHours()>=12?"PM":"AM"}get text(){return this.temporaryText}set text(n){n!==this.temporaryText&&(this.temporaryText=n)}get value(){return this.temporaryValue}set value(n){n!==this.temporaryValue&&(this.temporaryValue=n,qe(this.temporaryValue)&&Aa(this.temporaryValue)?(this.temporaryHours=this.temporaryValue.getHours(),this.temporaryMinutes=this.temporaryValue.getMinutes(),this.temporarySeconds=this.temporaryValue.getSeconds(),this.use12Hours&&qe(this.temporaryHours)&&(this.temporarySelected12Hours=this.temporaryHours>=12?"PM":"AM")):this.clearTimeValue())}get selected12Hours(){return this.temporarySelected12Hours}set selected12Hours(n){n.toUpperCase()!==this.temporarySelected12Hours&&(this.temporarySelected12Hours=n.toUpperCase(),this.update())}get defaultOpenValue(){return this.temporaryDefaultOpenValue.setHours(this.setValueByStep(this.temporaryDefaultOpenValue.getHours(),this.hourStep)),this.temporaryDefaultOpenValue.setMinutes(this.setValueByStep(this.temporaryDefaultOpenValue.getMinutes(),this.minuteStep)),this.temporaryDefaultOpenValue.setSeconds(this.setValueByStep(this.temporaryDefaultOpenValue.getSeconds(),this.secondStep)),this.temporaryDefaultOpenValue}set defaultOpenValue(n){this.temporaryDefaultOpenValue!==n&&(this.temporaryDefaultOpenValue=n,this.update())}get isEmpty(){return!(qe(this.temporaryHours)||qe(this.temporaryMinutes)||qe(this.temporarySeconds))}setFormat(n){this.format=n}setHours(n,o){return o?this:(this.setDefaultValueIfNil(),this.hours=n,this)}setUse12Hours(n){return this.use12Hours=n,this}setMinutes(n,o){return o?this:(this.setDefaultValueIfNil(),this.minutes=n,this)}setSeconds(n,o){return o?this:(this.setDefaultValueIfNil(),this.seconds=n,this)}setValue(n,o){return qe(o)&&(this.use12Hours=o),this.value=n,this}setValueByStep(n,o){let a=Math.floor(n/o);const r=n%o,i=o/2;return a=r>i?a+1:a,o*a}setDefaultOpenValue(n){return this.defaultOpenValue=n,this}setDefaultValueIfNil(){qe(this.temporaryValue)||(this.temporaryValue=new Date(this.defaultOpenValue))}update(){this.isEmpty?this.temporaryValue=void 0:(qe(this.temporaryHours)?this.temporaryValue.setHours(this.hours):this.temporaryHours=this.defaultHours,qe(this.temporaryMinutes)?this.temporaryValue.setMinutes(this.minutes):this.temporaryMinutes=this.defaultMinutes,qe(this.temporarySeconds)?this.temporaryValue.setSeconds(this.seconds):this.temporarySeconds=this.defaultSeconds,this.use12Hours&&(qe(this.temporarySelected12Hours)||(this.temporarySelected12Hours=this.default12Hours),this.selected12Hours==="PM"&&this.temporaryHours<12&&(this.temporaryHours+=12,this.temporaryValue.setHours(this.temporaryHours)),this.selected12Hours==="AM"&&this.temporaryHours>=12&&(this.temporaryHours-=12,this.temporaryValue.setHours(this.temporaryHours))),this.temporaryValue=new Date(this.temporaryValue),this.text=Gf(this.temporaryValue,this.format,this.selected12Hours),this.changedValue.value={text:this.text,value:this.temporaryValue})}clearTimeValue(){this.temporaryHours=void 0,this.temporaryMinutes=void 0,this.temporarySeconds=void 0,this.temporarySelected12Hours=void 0,this.temporaryValue=void 0}clear(){this.clearTimeValue(),this.update()}calculateViewHour(n){const o=this.temporarySelected12Hours||this.default12Hours;return o==="PM"&&n>12?n-12:o==="AM"&&n===0?12:n}}function NN(t,n,o,a,r,i){function s(f,u,d=0,m,g){const h=l(u,m,g),y=f.children[0].children[h]||f.children[0].children[0];p(f,y.offsetTop,d)}function l(f,u,d){if(u==="hour"){const m=t.disabledHours&&t.disabledHours();return c(m,o.value.map(g=>g.index).indexOf(f))}if(u==="minute"){const m=t.disabledMinutes&&t.disabledMinutes(d.hours);return c(m,a.value.map(g=>g.index).indexOf(f))}if(u==="second"){const m=t.disabledSeconds&&t.disabledSeconds(d.hours,d.minutes);return c(m,r.value.map(g=>g.index).indexOf(f))}return c([],i.value.map(m=>m.index).indexOf(f))}function p(f,u,d){if(d<=0){f.scrollTop=u;return}const g=(u-f.scrollTop)/d*10;Ky(()=>{f.scrollTop+=g,f.scrollTop!==u&&p(f,u,d-10)})}function c(f,u){return f&&f.length&&t.hideDisabledElements?u-f.reduce((d,m)=>d+(m<u?1:0),0):u}return{scrollToSelected:s}}function SN(t,n){function o(l){return l.index===t.viewHours||!qe(t.viewHours)&&l.index===t.defaultViewHours}function a(l){return l.index===t.minutes||!qe(t.minutes)&&l.index===t.defaultMinutes}function r(l){return l.index===t.seconds||!qe(t.seconds)&&l.index===t.defaultSeconds}function i(l){return l.value.toUpperCase()===t.selected12Hours||!qe(t.selected12Hours)&&l.value.toUpperCase()===t.default12Hours}function s(l,p){let c="";const f=` ${n}-select-option-selected `,u=` ${n}-select-option-disabled `;let d=!1;return p==="hour"?d=o(l):p==="minute"?d=a(l):p==="second"?d=r(l):d=i(l),d&&(c+=f),p==="12-hour"||l.disabled&&(c+=u),c}return{getSelectedClass:s}}const Ei=e.defineComponent({name:"FTimePickerTimeView",props:wN,emits:["valueChange","formatedValueChange"],setup(t,n){const o="time-picker-panel",a=e.ref(0),r=e.ref([]),i=e.ref([]),s=e.ref([]),l=e.ref([]),p=e.ref(),c=e.ref(),f=e.ref(),u=e.ref(),d=new VN,{scrollToSelected:m}=NN(t,n,r,i,s,l),{getSelectedClass:g}=SN(d,o),h=e.ref(t.hourStep),y=e.ref(t.minuteStep),v=e.ref(t.secondStep),b=e.ref(),x=e.ref(""),C=e.ref(),w=e.ref(t.hideDisabledElements),V=e.ref(0);e.watch(()=>t.defaultOpenValue,z=>{qe(z)&&(b.value=z)}),e.watch(b,z=>{qe(z)&&d.setDefaultOpenValue(z)}),b.value=t.defaultOpenValue,e.watch(d.changedValue,z=>{n.emit("valueChange",z)}),e.watch(()=>t.modelValue,z=>{N(z)}),e.watch(()=>t.format,z=>{qe(z)?x.value=z:x.value="HH:mm:ss"}),e.watch(x,z=>{qe(z)&&(d.setFormat(x.value),V.value=0,$.value&&V.value++,T.value&&V.value++,E.value&&V.value++,C.value&&(V.value++,W()),a.value=V.value*66)}),e.watch(()=>t.use12Hours,z=>{C.value=z}),e.watch(C,z=>{x.value=Uf(x.value,z),d.setUse12Hours(z)}),e.watch(()=>t.disabledHours,()=>{F()}),e.watch(()=>t.disabledMinutes,()=>{R()}),e.watch(()=>t.disabledSeconds,()=>{O()});function N(z){if(qe(z)){d.text=z;const q=zf(d.text,x.value);d.setValue(q,C.value),G()}else d.setUse12Hours(C.value)}function S(){let z=[];return t.disabledHours&&(z=t.disabledHours(),C.value&&(d.selected12Hours==="PM"?z=z.filter(q=>q>=12).map(q=>q>12?q-12:q):z=z.filter(q=>q<12||q===24).map(q=>q===24||q===0?12:q))),z}function D(z="hour"){return x.value?x.value.indexOf(z[0].toUpperCase())>-1||x.value.indexOf(z[0].toLowerCase())>-1:!1}const k=e.computed(()=>({"time-picker-panel":!0,"time-picker-panel-column-3":!0,"time-picker-panel-placement-bottomLeft":!0,"f-area-show":!0})),A=e.computed(()=>({width:C.value?`${a.value}px`:"100%"})),$=e.computed(()=>D("hour")),T=e.computed(()=>D("minute")),E=e.computed(()=>D("second"));function B(z,q=1,j=0){return q=Math.ceil(q),new Array(Math.ceil(z/q)).fill(0).map((Z,U)=>(U+j)*q)}function I(){if($.value&&p.value&&m(p.value,qe(d.viewHours)?d.viewHours:d.defaultViewHours,0,"hour",d),T.value&&c.value&&m(c.value,qe(d.minutes)?d.minutes:d.defaultMinutes,0,"minute",d),E.value&&f.value&&m(f.value,qe(d.seconds)?d.seconds:d.defaultSeconds,0,"second",d),C.value&&u.value){const q=(qe(d.selected12Hours)?d.selected12Hours:d.default12Hours)==="AM"?0:1;m(u.value,q,0,"12-hour",d)}}function F(){let z=24,q=0;C.value&&(z=12,q=1);const j=S();if(r.value=B(z,h.value,q).map(Z=>({index:Z,disabled:j.length>0&&j.indexOf(Z)!==-1})),C.value&&r.value[r.value.length-1].index===12){const Z=[...r.value];Z.unshift(Z[Z.length-1]),Z.splice(Z.length-1,1),r.value=Z}r.value=r.value.filter(Z=>!(w.value&&Z.disabled))}function R(){i.value=B(60,y.value).map(z=>({index:z,disabled:!!t.disabledMinutes&&t.disabledMinutes(d.hours).indexOf(z)!==-1})),i.value=i.value.filter(z=>!(w.value&&z.disabled))}function O(){s.value=B(60,v.value).map(z=>({index:z,disabled:!!t.disabledSeconds&&t.disabledSeconds(d.hours,d.minutes).indexOf(z)!==-1})),s.value=s.value.filter(z=>!(w.value&&z.disabled))}function W(){const z=x.value.includes("A");l.value=[{index:0,value:z?"AM":"am"},{index:1,value:z?"PM":"pm"}],l.value=l.value.filter(()=>!w.value)}function M(z,q){if(z.stopPropagation(),d.setHours(q.index,q.disabled),!q.disabled){if(m(p.value,q.index,120,"hour",d),t.disabledMinutes!==null){R();const j=i.value.filter(Z=>!Z.disabled);if(!j.find(Z=>Z.index===d.minutes)){const{index:Z,disabled:U}=j[0];d.setMinutes(Z,U)}}(t.disabledSeconds!==null||t.disabledMinutes!==null)&&O()}}function _(z,q){z.stopPropagation(),d.selected12Hours=q.value,F(),R(),O(),m(u.value,q.index,120,"12-hour",d)}function H(z,q){if(z.stopPropagation(),d.setMinutes(q.index,q.disabled),!q.disabled&&(m(c.value,q.index,120,"minute",d),t.disabledSeconds!==null)){O();const j=s.value.filter(Z=>!Z.disabled);if(!j.find(Z=>Z.index===d.seconds)){const{index:Z,disabled:U}=j[0];d.setSeconds(Z,U)}}}function L(z,q){z.stopPropagation(),d.setSeconds(q.index,q.disabled),!q.disabled&&m(f.value,q.index,120,"second",d)}function G(){F(),R(),O(),W()}e.onMounted(()=>{x.value=t.format,C.value=t.use12Hours,N(t.modelValue),G(),setTimeout(()=>{I()},10)});function Y(){return t.showHeader?e.createVNode("div",{class:o+"-combobox time-picker-panel-header",style:A.value},[$.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"+T.value?"time-header-split":""},[e.createTextVNode("时")])])]),T.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"+E.value?"time-header-split":""},[e.createTextVNode("分")])])]),E.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"},[e.createTextVNode("秒")])])]),t.use12Hours&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"},null)])])]):null}return()=>e.createVNode("div",{class:k.value},[e.createVNode("div",{class:"farris-timer-picker"},[e.createVNode("div",{class:o+"-inner"},[Y(),e.createVNode("div",{class:o+"-combobox",style:A.value},[$.value&&e.createVNode("div",{class:o+"-select",ref:p},[e.createVNode("ul",null,[r.value.map(z=>e.createVNode("li",{class:g(z,"hour"),onClick:q=>M(q,z)},[`${z.index}`]))])]),T.value&&e.createVNode("div",{class:o+"-select",ref:c},[e.createVNode("ul",null,[i.value.map(z=>e.createVNode("li",{class:g(z,"minute"),onClick:q=>H(q,z)},[`${z.index}`]))])]),E.value&&e.createVNode("div",{class:o+"-select",ref:f},[e.createVNode("ul",null,[s.value.map(z=>e.createVNode("li",{class:g(z,"second"),onClick:q=>L(q,z)},[`${z.index}`]))])]),C.value&&e.createVNode("div",{class:o+"-select",ref:u},[e.createVNode("ul",null,[l.value.map(z=>e.createVNode("li",{class:g(z,"12-hour"),onClick:q=>_(q,z)},[`${z.value}`]))])])])])])])}}),Bi=e.defineComponent({name:"FTimePicker",props:$i,emits:["update:modelValue","valueChange","clear"],setup(t,n){const o='<span class="f-icon f-icon-timepicker"></span>',a=e.ref(t.modelValue),r=e.ref(null),i=e.ref(),s=e.computed(()=>Uf(t.format,t.use12Hours));function l(){a.value="",n.emit("clear")}function p(){if(a.value){const u=zf(a.value,s.value);a.value=Gf(u,s.value)}}function c(){p()}function f(u){a.value=u.text}return p(),e.watch(()=>t.modelValue,u=>{a.value=u}),e.watch(a,u=>{n.emit("valueChange",u)}),()=>e.createVNode(dt,{ref:r,modelValue:a.value,"onUpdate:modelValue":u=>a.value=u,disable:t.disable,readonly:t.readonly,editable:t.editable,buttonContent:o,placeholder:t.placeholder,enableClear:!0,onClear:l,onBlur:c},{default:()=>[e.createVNode(Ei,e.mergeProps({ref:i},t,{onValueChange:f}),null)]})}}),TN=e.defineComponent({name:"FTimePickerDesign",props:$i,emits:["datePicked","update:modelValue"],setup(t,n){const o='<span class="f-icon f-icon-timepicker"></span>',a=e.ref(t.modelValue),r=e.ref(),i=e.ref(),s=e.inject("design-item-context"),l=ye(i,s);e.onMounted(()=>{i.value.componentInstance=l}),n.expose(l.value);function p(){}return()=>e.createVNode("div",{ref:i},[e.createVNode(dt,{ref:r,modelValue:a.value,"onUpdate:modelValue":c=>a.value=c,buttonContent:o,enableClear:!0,onClickButton:()=>void 0},{default:()=>[e.createVNode(e.resolveComponent("f-time-picker-time-view"),null,null)]})])}}),Yf={install(t){t.component(Bi.name,Bi).component(Ei.name,Ei)},register(t,n,o){t["time-picker"]=Bi,n["time-picker"]=qf},registerDesigner(t,n,o){t["time-picker"]=TN,n["time-picker"]=qf}},DN=e.defineComponent({name:"FTransferDesign",props:pa,emits:["change"],setup(t,n){const o=e.ref(t.identifyField),a=e.ref("已选:"),r=e.ref("项数据"),i=e.ref(t.displayType),s=e.ref(!1),l=e.ref(t.dataSource),p=e.ref(t.selections||[]),c=e.computed(()=>p.value.map(k=>k[o.value])),f=new Map;function u(){const k=new Map,A=t.selectionValues||[];A.length&&A.reduce((T,E)=>(T.set(E,!0),T),k);const $=t.selections||[];$.length&&(k.clear(),$.reduce((T,E)=>(T.set(E[o.value],!0),T),k)),p.value.length||(p.value=l.value.filter(T=>k.has(T[o.value])).map(T=>Object.assign({},T))),l.value.forEach(T=>{const E=T[o.value],B=k.has(E);T.checked=B,B&&f.set(E,T)})}u();const d=e.computed(()=>i.value==="List"),m=e.computed(()=>i.value==="Tree");function g(k){p.value=k.map(A=>Object.assign({},A)),n.emit("change",p.value)}function h(){return e.createVNode(Tt,{class:"f-utils-fill",data:l.value,"multi-select":!0,draggable:!1,header:"Search",headerClass:"transfer-search-box","selection-values":c.value,onSelectionChange:g},{default:()=>[e.createTextVNode(" ")]})}function y(){return e.createVNode(e.Fragment,null,null)}function v(){return e.createVNode("div",{class:"f-utils-fill option-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column option-pane-content f-utils-fill"},[e.createVNode("div",{class:"container columns-box d-flex f-utils-fill"},[d.value&&h(),m.value&&y()])])])}function b(k){const A=k[o.value];if(A!==null||A!==void 0){p.value=p.value.filter(T=>T[o.value]!==A);const $=f.get(A);$&&($.checked=!1,f.delete(A)),n.emit("change",p.value)}}function x(k){const A=new Map;p.value.reduce(($,T)=>($.set(T[o.value],T),$),A),p.value=k.map($=>A.get($[o.value])),n.emit("change",p.value)}function C(){return e.createVNode(Tt,{style:"flex:1",data:p.value,draggable:!0,view:"DraggableView","keep-order":!0,onChange:x,onRemoveItem:b},{default:()=>[e.createTextVNode(" ")]})}function w(){return e.createVNode("div",{class:"f-utils-fill selection-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column selection-pane-content f-utils-fill"},[e.createVNode("div",{class:"selection-pane-title"},[e.createVNode("span",{class:"selection-title"},[a.value]),e.createVNode("span",{class:"selection-count"},[p.value&&p.value.length]),e.createVNode("span",{class:"selection-item-title"},[r.value])]),e.createVNode("div",{class:"container columns-box f-utils-fill d-flex"},[C()])])])}const V=e.computed(()=>({transfer:!0,row:!0,"f-utils-fill":s.value})),N=e.ref(),S=e.inject("design-item-context"),D=ye(N,S);return e.onMounted(()=>{N.value.componentInstance=D}),n.expose(D.value),()=>e.createVNode("div",{ref:N,class:V.value,style:"height:480px"},[v(),w()])}}),Zf={install(t){t.component(wn.name,wn)},register(t,n,o){t.transfer=wn,n.transfer=Nl},registerDesigner(t,n,o){t.transfer=DN,n.transfer=Nl}},kN=new Map([["appearance",ge]]);function AN(t,n,o){return n}const $N={title:"tree-view",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},EN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-view.schema.json",title:"tree-view",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for tree-view",type:"string"},type:{description:"The type string of tree-view",type:"string",default:"tree-view"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Fi={columns:{type:Array,default:[{field:"name",title:"",dataType:"string"}]},displayField:{type:String,default:"name",require:!0},showLines:{type:Boolean,default:!1},data:{type:Object,default:[]},disable:{type:Boolean,default:!1},fit:{type:Boolean,default:!1},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},pagination:{type:Object,default:{enable:!0,size:-1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showTreeNodeIcons:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},iconField:{type:String,default:""},width:{type:Number,default:-1},newDataItem:{type:[Function,Object],default:()=>{}},lineColor:{type:String,default:"#9399a0"},cellHeight:{type:Number,default:28},onOutputValue:{type:Function,default:()=>{}},onCurrentEvent:{type:Function,default:()=>{}},hierarchy:{type:Object,default:{cascadeOption:{autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},rowOption:{type:Object}},Kf=me(Fi,EN,kN,AN,$N);function Qf(t,n,o,a,r,i,s,l,p,c,f,u,d){const{calculateCellPositionInRow:m}=a,{columnContext:g}=r,{gridDataStyle:h}=d,{renderDataRow:y}=gm(t,n,g,o,i,s,l,p,c,f);function v(){const x=m(g.value.primaryColumns);return o.value.filter(C=>C.visible!==!1).map(C=>y(C,x))}function b(){return e.createVNode("div",{class:"fv-tree-data",style:h.value},[v()])}return{renderTreeArea:b}}function BN(t,n,o,a){var h,y,v,b,x,C;const{idField:r}=o,i=e.ref(((y=(h=t.hierarchy)==null?void 0:h.cascadeOption)==null?void 0:y.autoCheckChildren)||!1),s=e.ref(((b=(v=t.hierarchy)==null?void 0:v.cascadeOption)==null?void 0:b.autoCheckParent)||!1),l=e.ref(((C=(x=t.hierarchy)==null?void 0:x.cascadeOption)==null?void 0:C.selectionRange)||"All");e.watch(()=>{var w;return(w=t.hierarchy)==null?void 0:w.cascadeOption},w=>{i.value=w?!!w.autoCheckChildren:!1,s.value=w?!!w.autoCheckParent:!1,l.value=w?w.selectionRange:"All"});function p(w,V){for(let N=0;N<V.length;N++)if(!w.includes(V[N]))return!1;return!0}function c(w,V){return w.filter(S=>V.indexOf(S)===-1)}const f=e.computed(()=>l.value==="OnlyParent"),u=e.computed(()=>l.value==="OnlyChildren");function d(w,V){let N=w;const S=n.value[V],D=S.raw[r.value],k=Array.from(S.raw.__fv_descendant_index__).map(I=>n.value[I]),A=k.map(I=>I.raw[r.value]),$=p(w,A),T=p(w,[D]);return T&&$&&f.value&&(N=c(w,A),k.forEach(I=>{I.disable=!0})),T&&$&&u.value&&(N=c(w,[D]),k.forEach(I=>{I.disable=!0})),N}function m(w,V){let N=w;const S=V[r.value],D=Array.from(V.__fv_children_index__).map(B=>n.value[B]),k=D.map(B=>B.raw[r.value]),A=p(w,k),$=p(w,[V[r.value]]);return $&&A&&f.value&&(N=c(w,k),D.forEach(B=>{B.disable=!0})),$&&A&&u.value&&(N=c(w,[S]),D.forEach(B=>{B.disable=!0})),N}function g(w,V){let N=w.map(A=>A[r.value]);return V.__fv_parent_index__>0&&(N=d(N,V.__fv_parent_index__)),V.__fv_children_index__.length>0&&(N=m(N,V)),w.filter(A=>N.includes(A[r.value]))}return{autoCheckChildren:i,autoCheckParent:s,interactAfterCheckHierarchyItem:g}}function Ii(t,n,o,a,r){const{select:i,unSelect:s,indeterminate:l,getSelectedItems:p}=a,{autoCheckChildren:c,autoCheckParent:f,interactAfterCheckHierarchyItem:u}=BN(t,n,o),{idField:d}=o;function m(){return n.value.filter(V=>!!V.checked).map(V=>V.raw.__fv_index__)}function g(V,N){return V.filter(D=>N.indexOf(D)===-1)}function h(V){const N=m();V.raw.__fv_children_index__.some(D=>N.includes(D))&&!!V.checked!==!0&&l(V)}function y(V){let N=V.raw.__fv_parent_index__;for(;N!==void 0;){const S=m(),D=n.value[N],k=g(D.raw.__fv_children_index__,S);k.length===D.raw.__fv_children_index__.length&&k.length!==0?s(D):k.length===0?f.value&&i(D):k.length<D.raw.__fv_children_index__.length&&D.checked!==!0&&l(D),N=D.raw.__fv_parent_index__}}function v(V){const N=!!V.checked;c.value&&V.raw.__fv_children_index__.map(S=>n.value[S]).forEach(S=>{N?i(S):s(S)})}function b(V){v(V),y(V);const N=V.raw;let S=p();S=u(S,N),h(V),r.emit("selectionChange",S)}function x(V,N){let S=-1;if(V.raw.__fv_parent_index__>-1){const $=n.value[V.raw.__fv_parent_index__].raw.__fv_descendant_index__,T=$.length>1,E=$.findIndex(I=>I===N),B=E===$.length-1;S=T?B?$[E-1]:$[E+1]:-1}return S>-1?n.value[S]:null}function C(V){return V.raw.__fv_parent_index__>-1?n.value[V.raw.__fv_parent_index__]:null}function w(V){const N=n.value[V];if(!N)return null;const S=x(N,V),k=S!==null?S:C(N);return k?k.raw[d.value]:null}return{getNextSelectableHierarchyItemId:w,toggleSelectHierarchyItem:b}}const zo=e.defineComponent({name:"FTreeView",props:Fi,emits:["outputValue","currentEvent","selectionChange"],setup(t,n){const o=e.ref(),a=e.ref(!1),r=e.ref([]),i=Xt(t),s=Ut(t),l=Gt(t,new Map,s,i),p=Jt(t,l,i,r,n),c=Ii(t,r,i,p,n),f=e.computed(()=>({"fv-tree":!0})),u=e.computed(()=>({"fv-tree-content":!0})),{containerStyleObject:d}=qn(t);function m(L){}function g(){return[]}function h(){return[]}const y=e.ref(t.columns),v=zn(t),{columnContext:b}=v,x=0,C=e.computed(()=>l.dataView.value.length),w=Qt(t,i),V=Pt(),N=Zt(t,{},V),S=Kt(t,w,s,i,V,N),D=Yt(t,y,l,C,x,S),{getVisualData:k}=D,A=bn(t,b);r.value=k(0,C.value+x-1);const $=Un(t,n,p,i),T=Gn(t,l,r,b,D,C,x,e.ref(0)),{renderTreeArea:E}=Qf(t,n,r,A,v,l,w,s,$,p,c,D,T);function B(){const L=p.getSelectionRow();return L?L.dataIndex-1:-1}function I(){const L=B();l.insertNewDataItem(L),r.value=k(0,C.value+x-1)}function F(){const L=B();l.insertNewChildDataItem(L),r.value=k(0,C.value+x-1)}function R(){const L=B(),G=c.getNextSelectableHierarchyItemId(L);l.removeHierarchyDataItem(L),r.value=k(0,C.value+x-1),G&&p.selectItemById(G)}function O(L,G){l.editDataItem(L,G),r.value=k(0,C.value+x-1)}function W(){}function M(){}function _(L){if(L>-1){const G=r.value[L];p.selectItem(G)}}function H(L){if(L){const G=p.getSelectionRow();if(l.load(L),r.value=k(0,C.value+x-1),G&&G.raw&&G.raw.originalId){const Y=L.findIndex(z=>z.originalId===G.raw.originalId);Y>-1&&_(Y)}}}return n.expose({addNewDataItem:I,addNewChildDataItem:F,removeDataItem:R,editDataItem:O,acceptDataItem:W,cancelDataItem:M,selectItem:_,updateDataSource:H}),e.watch(()=>[t.data],([L])=>{const G=p.getSelectionRow();if(l.load(L),r.value=k(0,C.value+x-1),G&&G.raw&&G.raw.originalId){const Y=L.findIndex(z=>z.originalId===G.raw.originalId);Y>-1&&_(Y)}}),()=>e.createVNode("div",{class:f.value,style:d.value,onWheel:m},[e.createVNode("div",{ref:o,class:u.value,onMouseover:()=>{a.value=!0},onMouseleave:()=>{a.value=!1}},[E(),g(),h()])])}}),FN=e.defineComponent({name:"FTreeViewDesign",props:Fi,emits:["outputValue","currentEvent","selectionChange"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);e.ref(t.idField);const i=e.ref(),s=e.ref(!1),l=e.ref([]),p=Ut(t),c=Xt(t),f=Gt(t,new Map,p,c),u=Jt(t,f,c,l,n),d=Ii(t,l,c,u,n),m=e.computed(()=>({"fv-tree":!0})),g=e.computed(()=>({"fv-tree-content":!0})),{containerStyleObject:h}=qn(t);function y(R){}function v(){return[]}function b(){return[]}const x=e.ref(t.columns),C=zn(t),{columnContext:w}=C,V=0,N=e.computed(()=>f.dataView.value.length),S=Qt(t,c),D=Pt(),k=Zt(t,{},D),A=Kt(t,S,p,c,D,k),$=Yt(t,x,f,N,V,A),{getVisualData:T}=$,E=bn(t,w);l.value=T(0,N.value+V-1);const B=Un(t,n,u,c),I=Gn(t,f,l,w,$,N,V,e.ref(0)),{renderTreeArea:F}=Qf(t,n,l,E,C,f,S,p,B,u,d,$,I);return n.expose(r.value),()=>e.createVNode("div",{class:m.value,style:h.value,onWheel:y},[e.createVNode("div",{ref:i,class:g.value,onMouseover:()=>{s.value=!0},onMouseleave:()=>{s.value=!1}},[F(),v(),b()])])}}),Xf={install(t){t.component(zo.name,zo)},register(t,n,o){t["tree-view"]=zo,n["tree-view"]=Kf},registerDesigner(t,n,o){t["tree-view"]=FN,n["tree-view"]=Kf}},IN={checked:{type:Boolean,default:!1},id:{type:String,default:""},disabled:{type:Boolean,default:!1}},MN={showInfo:{type:Boolean,default:!0},status:{type:String,default:"normal"},percent:{type:Number,default:0},maxWidth:{type:Number,default:0}},ON={selectText:{type:String,default:"选择文件"},disabled:{type:Boolean,default:!1},enableMulti:{type:Boolean,default:!0},accept:{type:String,default:"*"},options:{type:Object,default:{}},uploadedCount:{type:Number,default:0},extendConfig:{type:Object,default:{}},uploadServerToken:{type:String,default:""}},PN=e.defineComponent({name:"FUploadProgress",props:MN,setup(t,n){const{showInfo:o,status:a,maxWidth:r,percent:i}=e.toRefs(t);return()=>e.createVNode("div",{class:["f-progress upload-progress","upload-progress-status-"+a.value,"f-progress-status-"+a.value,"upload-progress-line",o.value?"upload-progress-show-info":""]},[e.createVNode("div",{class:"upload-progress-outer",style:{"max-width":r.value>0?r.value+"px":"auto"}},[e.createVNode("div",{class:"upload-progress-inner"},[e.createVNode("div",{class:"upload-progress-bg f-progress-bg",style:{width:i.value+"%"}},null)])]),o.value?e.createVNode("span",{class:"upload-progress-text"},[a.value==="error"||a.value==="success"?e.createVNode("span",{class:["upload-progress-text-icon f-icon","f-icon-"+a.value]},null):e.createVNode(e.Fragment,null,[i.value,e.createTextVNode("%")])]):""])}}),Jf=e.defineComponent({name:"FPreviewCheckbox",props:IN,emits:["checkedChange"],setup(t,n){const{disabled:o}=e.toRefs(t),a=e.ref(t.checked),r=i=>{i.stopPropagation(),o.value||(a.value=!a.value,n.emit("checkedChange",{checked:a.value,id:t.id}))};return e.watch(()=>t.checked,i=>{a.value=i}),()=>e.createVNode("div",{class:"preview-checkbox d-inline-flex align-middle"},[e.createVNode("div",{class:"custom-control custom-checkbox f-checkradio-single m-0"},[e.createVNode("input",{title:"custom-control-input",class:"custom-control-input",type:"checkbox",disabled:o.value,checked:a.value},null),e.createVNode("label",{class:"custom-control-label",onClick:i=>r(i),onMousedown:i=>i.stopPropagation()},null)])])}});var St=(t=>(t[t.Queue=0]="Queue",t[t.Uploading=1]="Uploading",t[t.Done=2]="Done",t[t.Cancelled=3]="Cancelled",t[t.Remove=4]="Remove",t[t.Error=5]="Error",t))(St||{});class _N{constructor(n={},o={}){P(this,"uploadConfig");P(this,"removeConfig");const a={type:"config",url:"",timeout:0,headers:null,data:{}};this.uploadConfig=Object.assign({},a,n),this.removeConfig=Object.assign({},a,o)}}function Mi(t,n){const{formatTo:o}=_a();return o(t,n)}function ep(t,n){if(!n)return"";let o="";return t.indexOf(".")===-1&&n.hasOwnProperty(t)?o=n[t]:o=t.split(".").reduce((a,r)=>a?a[r]:null,n),o}function RN(t){return(n,o)=>{if(!n.hasOwnProperty(t)||n[t]===void 0||n[t]===null)return 1;if(!o.hasOwnProperty(t)||o[t]===void 0||o[t]===null)return-1;if(t!=="createTime"){let i="",s="";return t.indexOf(".")>-1?(i=ep(t,n),s=ep(t,o)):(i=n[t],s=o[t]),i>s?1:-1}const a=new Date(n[t]),r=new Date(o[t]);return a.getTime()>r.getTime()?-1:1}}function tp(t){return(t||[]).findIndex(o=>o==="*")===-1}function np(t){return t!=="0 Byte"}function Rn(t){if(t===0)return"0 Byte";const n=1024,o=["Bytes","KB","MB","GB","TB","PB"],a=Math.floor(Math.log(t)/Math.log(n));return parseFloat((t/n**a).toFixed(2))+" "+o[a]}function op(t,n){return t&&(t.hasOwnProperty("allowedContentTypes")&&(n.allowedContentTypes=t.allowedContentTypes||["*"],n.allowedContentTypes=n.allowedContentTypes&&n.allowedContentTypes.length>0?n.allowedContentTypes:["*"]),t.hasOwnProperty("maxUploads")&&(n.maxUploads=t.maxUploads||0),t.hasOwnProperty("maxFileSize")&&(n.maxFileSize=Rn(1024*1024*(parseInt(String(t.maxFileSize),10)||1)))),n}function ap(t){let n="ffilepreview--filetype";if(!t)return n+"-any";const o=t.lastIndexOf(".");let a="";switch(o>-1&&(a=t.substring(o+1).toLocaleLowerCase()),a){case"pdf":n+="-pdf";break;case"jpeg":case"jpg":case"gif":case"svg":case"png":case"bmp":n+="-img";break;case"ppt":case"pptx":n+="-ppt";break;case"doc":case"docx":n+="-doc";break;case"xls":case"xlsx":n+="-xls";break;case"txt":n+="-txt";break;case"zip":n+="-zip";break;case"wps":n+="-wps";break;case"wpt":n+="-wpt";break;default:n+="-any"}return n}function rp(t){var n;if(t.type==="done")return 100;if(t.file&&t.file.progress){if(t.file.progress.status===St.Uploading){const o=((n=t.file.progress.data)==null?void 0:n.percentage)||5;return o>5?o:5}return 5}return 5}function LN(t){let n=t;return t?(typeof t=="string"&&(n=parseInt(t,10)),Rn(n)):"0 Byte"}const HN=()=>Math.random().toString(36).substring(7);function ip(t,n){return{fileIndex:n,id:HN(),name:t.name,size:t.size,type:t.type,form:new FormData,progress:{status:St.Queue,data:{percentage:0,speed:0,speedHuman:`${Rn(0)}/s`,startTime:null,endTime:null,eta:null,etaHuman:null}},lastModifiedDate:Mi(new Date(t.lastModified),"yyyy-MM-dd HH:mm:ss"),nativeFile:t}}function jN(t){const n=[];return t.forEach(o=>{const a={id:"",name:"",size:0,type:"",extend:null,extendHeaders:null,createTime:""};for(const r in a){const i=r.replace("extend","response").replace("createTime","lastModifiedDate");o.hasOwnProperty(i)&&(i==="lastModifiedDate"?a[r]=Mi(o[i],"yyyy-MM-dd HH:mm:ss"):a[r]=o[i])}n.push(a)}),n}function WN(t,n){return t?n<=t*1024*1024:!0}function qN(t){return t.find(n=>n==="*")!==void 0}function zN(t,n){if(!t||t.length===0||qN(t))return!0;if(n.lastIndexOf(".")<0)return!1;const o=n.substr(n.lastIndexOf("."));return t.findIndex(a=>a.toLowerCase()===o.toLowerCase())>-1}function GN(t){if(t)return t.split(`
|
|
6
|
+
a ${v},${v} 0 1 1 ${-w},${V}`}),g=e.computed(()=>{const v=50-l.value/2,b=Math.PI*2*v,x=t.gapDegree||(t.progressType==="circle"?0:75);return{strokeDasharray:`${b-x}px ${b}px`,strokeDashoffset:`-${x/2}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"}}),h=e.computed(()=>{const v=50-l.value/2,b=Math.PI*2*v,x=t.gapDegree||(t.progressType==="circle"?0:75),C=t.successPercent!==void 0&&t.successPercent!==null?[t.successPercent,t.percent]:[t.percent];return C.map((w,V)=>{const N=C.length===2&&V===0;return{stroke:i.value&&!N?`url(#gradient-${d.value})`:null,strokePathStyle:{stroke:i.value?null:N?"default":t.strokeColor,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",strokeDasharray:`${(w||0)/100*(b-x)}px ${b}px`,strokeDashoffset:`-${x/2}px`}}}).reverse()}),y=e.computed(()=>({width:`${t.percent}%`,"border-radius":t.strokeLinecap==="round"?"100px":"0",background:i.value?null:t.strokeColor,"background-image":i.value?s.value:null,height:`${l.value}px`}));return{progressClass:p,inCircleProgressBarStyle:c,inCircleProgressBarClass:f,pathString:m,trailPathStyle:g,progressCirclePaths:h,gradientId:d,inlineProgressBackgroundStyle:y}}function gw(t){return{isCircleStyle:e.computed(()=>t.progressType==="circle"||t.progressType==="dashboard")}}function yw(t){const n=e.computed(()=>{const r={"f-progress-text-icon":!0,"f-icon":!0},i=`f-icon-${t.progressStatus}`;return r[i]=!0,r}),o=e.computed(()=>{const r={"f-progress-text-icon":!0,"f-icon":!0},i=t.progressStatus==="success"?"f-icon-checkmark":"f-icon-x";return r[i]=!0,r}),a=e.computed(()=>t.progressStatus==="error"||t.progressStatus==="success");return{inlineProgrssStatusClass:n,circleProgrssStatusClass:o,shouldShowStatus:a}}function bw(t){const n=e.computed(()=>({width:`${t.successPercent}%`,"border-radius":t.strokeLinecap==="round"?"100px":"0",height:`${t.strokeWidth}px`,"background-image":t.enableBackgroundImg?`url(${t.backgroundImg})`:null})),o=e.computed(()=>t.successPercent||t.successPercent===0);return{inlineProgressSuccessBackgroundStyle:n,shouldShowSuccessInlineProgressBackground:o}}const Pn=e.defineComponent({name:"FProgress",props:ri,emits:[],setup(t){const n=e.ref(t.progressType),o=e.ref(t.showInfo),a=e.ref(t.percent),r=e.ref(t.strokeLinecap),i=fw(t),{isGradient:s,circleGradient:l}=i,p=pw(t),{strokeWidth:c}=p,{formatPercentageText:f}=mw(t),u=gw(t),{isCircleStyle:d}=u,{progressClass:m,inCircleProgressBarStyle:g,inCircleProgressBarClass:h,pathString:y,trailPathStyle:v,progressCirclePaths:b,gradientId:x,inlineProgressBackgroundStyle:C}=hw(t,u,i,p),{inlineProgrssStatusClass:w,circleProgrssStatusClass:V,shouldShowStatus:N}=yw(t),{inlineProgressSuccessBackgroundStyle:S,shouldShowSuccessInlineProgressBackground:D}=bw(t);e.watch(()=>t.percent,T=>{a.value=T||0});function k(){return o.value&&e.createVNode("span",{class:"f-progress-text"},[N.value?e.createVNode("span",{class:d.value?V.value:w.value},null):f.value])}function A(){return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-progress-outer"},[e.createVNode("div",{class:"f-progress-inner"},[e.createVNode("div",{class:"f-progress-bg",style:C.value},null),D.value&&e.createVNode("div",{class:"f-progress-success-bg",style:S.value},null)])]),k()])}function $(){return e.createVNode("div",{class:h.value,style:g.value},[e.createVNode("svg",{class:"f-progress-circle",viewBox:"0 0 100 100"},[s.value&&e.createVNode("defs",null,[e.createVNode("linearGradient",{id:"gradient-"+x.value,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[l.value.map(T=>e.createVNode("stop",{offset:T.offset,"stop-color":T.color},null))])]),e.createVNode("path",{class:"f-progress-circle-trail",stroke:"#efefef","fill-opacity":"0","stroke-width":c.value,d:y.value,style:v.value},null),b.value.map(T=>e.createVNode("path",{class:"f-progress-circle-path","fill-opacity":"0",d:y.value,"stroke-linecap":r.value,stroke:T.stroke,"stroke-width":a.value?c.value:0,style:T.strokePathStyle},null))]),k()])}return()=>e.createVNode("div",{class:m.value},[n.value==="line"&&A(),d.value&&$()])}}),vw=e.defineComponent({name:"FProgressDesign",props:ri,emits:[],setup(t,n){const o=e.ref(t.progressStatus),a=e.ref(t.progressType),r=e.ref(t.size),i=e.ref(t.showInfo),s=e.ref(t.strokeWidth),l=e.ref(t.percent),p=e.ref(t.strokeLinecap),c=e.ref(!1),f=e.ref(t.strokeColor),u=e.ref(null),d=e.ref(0),m=e.ref(t.width),g=e.ref(""),h=e.ref([]),y=e.ref(""),v=e.ref([]),b=e.ref(t.enableBackgroundImg),x=e.ref(t.backgroundImg),C=e.ref(),w=e.inject("design-item-context"),V=ye(C,w);e.onMounted(()=>{C.value.componentInstance=V}),n.expose(V.value),e.watch(()=>t.percent,F=>{l.value=F||0});const N=e.computed(()=>s.value||(a.value==="line"&&r.value!=="small"?8:6)),S=e.computed(()=>a.value==="circle"||a.value==="dashboard"),D=e.computed(()=>{const F={"f-progress":!0,"f-progress-line":a.value==="line","ant-progress-small":r.value==="small","f-progress-show-info":i.value,".f-progress-circle":S.value},R=`f-progress-status-${o.value}`;return F[R]=!0,F}),k=e.computed(()=>({width:`${l.value}%`,"border-radius":p.value==="round"?"100px":"0",backgroud:c.value?null:f.value,"background-image":c.value?u.value:null,height:`${N.value}px`})),A=e.computed(()=>({width:`${l.value}%`,"border-radius":p.value==="round"?"100px":"0",height:`${N.value}px`,"background-image":b.value?x.value:null})),$=e.computed(()=>d.value||d.value===0);function T(){return e.createVNode("div",{class:"f-progress-outer"},[e.createVNode("div",{class:"f-progress-inner"},[e.createVNode("div",{class:"f-progress-bg",style:k.value},null),$.value&&e.createVNode("div",{class:"f-progress-success-bg",style:A.value},null)])])}const E=e.computed(()=>({width:`${m.value}px`,height:`${m.value}px`,"font-size":`${m.value*.15+6}px`,"f-progress-circle-gradient":c.value})),B=e.computed(()=>({}));function I(){return e.createVNode("div",{class:"f-progress-inner",style:E.value},[e.createVNode("svg",{class:"f-progress-circle",viewBox:"0 0 100 100"},[c.value&&e.createVNode("defs",null,[e.createVNode("linearGradient",{id:"gradient-"+g.value,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[h.value.map(F=>e.createVNode("stop",{offset:F.offset,"stop-color":F.color},null))])]),e.createVNode("path",{class:"f-progress-circle-trail",stroke:"#efefef","fill-opacity":"0","stroke-width":N.value,d:y.value,style:B.value},null),v.value.map(F=>e.createVNode("path",{class:"f-progress-circle-path","fill-opacity":"0",d:y.value,"stroke-linecap":p.value,stroke:F.stroke,"stroke-width":l.value?N.value:0,style:F.strokePathStyle},null))])])}return()=>e.createVNode("div",{ref:C,class:D.value},[a.value==="line"&&T(),S.value&&I()])}}),lf={install(t){t.component(Pn.name,Pn)},register(t,n,o){t.progress=Pn,n.progress=sf},registerDesigner(t,n,o){t.progress=vw,n.progress=sf}};var ii=(t=>(t.Equal="0",t.NotEqual="1",t.Greater="2",t.GreaterOrEqual="3",t.Less="4",t.LessOrEqual="5",t.Like="6",t.LikeStartWith="7",t.LikeEndWith="8",t))(ii||{});const xw=[{value:"0",name:"等于"},{value:"1",name:"不等于"},{value:"2",name:"大于"},{value:"3",name:"大于等于"},{value:"4",name:"小于"},{value:"5",name:"小于等于"},{value:"6",name:"包含"},{value:"7",name:"开始是"},{value:"8",name:"结束是"}],Cw={"button-edit":["0","1"," 6","7","8"],"check-box":["0"],"combo-list":["0","1"],"combo-lookup":["0","1"," 6","7","8"],"date-picker":["0","1","2","3","4","5"],"date-range":[],"datetime-picker":["0","1","2","3","4","5"],"datetime-range":[],"month-picker":["0","1","2","3","4","5"],"month-range":[],"year-picker":["0","1","2","3","4","5"],"year-range":[],"input-group":["0","1","6","7","8"],lookup:["0","1"],"number-range":[],"number-spinner":["0"," 1","2","3","4","5"],"radio-group":["0"],text:["0","1"," 6","7","8"]};function ww(t,n,o){const{fieldMap:a}=o;function r(i){const s=a.get(i.fieldCode);if(!s)return[];const l=s.editor.type,p=new Set(Cw[l]);return xw.filter(f=>p.has(f.value))}return{getCompareOperators:r}}function cf(t,n){const o=e.ref(t.fields),a=e.ref([]),r=new Map,{createConditionValue:i}=Tr();function s(f){switch(f.editor?f.editor.type:"input-group"){case"date-range":f.editor.type="date-picker";break;case"datetime-range":f.editor.type="datetime-picker";break;case"number-range":f.editor.type="number-spinner";break}return f.editor}function l(f){return f.map(d=>Object.assign({},d)).map(d=>(d.editor=s(d),d))}function p(f=!0){o.value.reduce((u,d)=>(f||(d.editor=s(d)),u.set(d.labelCode,d),u),r)}function c(f){return f.forEach(u=>{if(u&&typeof u.valueConfig=="object"){const d=r.get(u.fieldCode);u.value=i(d.editor.type,u.valueConfig.content)}}),f}return{convertToSingleControl:l,fields:o,fieldMap:r,fieldConditions:a,loadFieldConfigs:p,initialConditionValue:c}}function Vw(t,n,o){const a=e.ref(null),r=e.ref(o),i=e.ref(0),s=e.computed(()=>c(i.value));function l(){r.value&&(a.value=new ResizeObserver(p(f=>{const u=f[0];i.value=u.contentRect.width})),a.value.observe(r.value))}function p(f,u){let d=null;return function(){const m=arguments;d||(d=setTimeout(()=>{d=null},500),f(...m))}}function c(f){let d="col-12";return f>250*6?d="col-2":f>250*4?d="col-3":f>250*3?d="col-4":f>250*2&&(d="col-6"),d}return e.watch([o],([f])=>{r.value=f,l()}),{conditionClass:s,resizeObserver:a}}const _n=e.defineComponent({name:"FConditionFields",props:jl,emits:["valueChange","blur","focus","click","input"],setup(t,n){const o=e.ref(),a=e.ref(t.key),r=e.ref(t.isControlInline),i=e.ref(t.conditions),s=cf(t),{initialConditionValue:l,fieldMap:p,loadFieldConfigs:c}=s,f=Vw(t,n,o),{conditionClass:u,resizeObserver:d}=f;c(!0),l(i.value),e.onBeforeUnmount(()=>{var v;(v=d.value)==null||v.unobserve(o.value)}),e.watch(()=>t.conditions,()=>{i.value=t.conditions});const m=e.computed(()=>({"f-utils-flex-row-wrap":!0,"farris-form":!0,"farris-form-controls-inline":r.value})),g=e.computed(()=>u.value);function h(v,b){n.emit("valueChange",v,b)}function y(){return i.value.map(v=>{var b;return e.createVNode(zt,{customClass:g.value,label:v.fieldName,editor:(b=p.get(v.fieldCode))==null?void 0:b.editor,modelValue:v.value.value,"onUpdate:modelValue":x=>v.value.value=x,onChange:x=>{h(x,v)}},null)})}return()=>e.createVNode("div",{class:m.value,key:a.value,ref:o},[y()])}});var si=(t=>(t[t.Value=0]="Value",t[t.SmartHelp=1]="SmartHelp",t[t.Enum=2]="Enum",t[t.Express=3]="Express",t))(si||{});function df(){const t=e.ref({relation:0,items:[],children:[],path:[],groupId:0,level:0}),n=new Map,o=new Map;let a=0;function r(){return{id:"",fieldCode:"",fieldName:"",compareType:ii.Equal,valueType:si.Value,value:new Xd,relation:0,conditionId:Date.now()}}function i(D,k){return{relation:D,items:[],children:[],path:[],groupId:++a,level:k}}function s(){const D=Object.assign({},t.value);o.forEach((k,A)=>{k.groupId===D.groupId&&o.set(A,D)}),n.forEach((k,A)=>{k.groupId===D.groupId&&n.set(A,D)}),t.value=D}function l(D){const k=new Map;let A=0;return D.forEach(($,T)=>{var E,B;if(A+=((E=$.lBracket)==null?void 0:E.length)||0,k.set(T,A),A-=((B=$.rBracket)==null?void 0:B.length)||0,A<0)throw new Error("The right bracket is out of range.")}),k}function p(D,k,A,$,T){for(let E=0;E<k;E++){const B=D+(E+1),I=i(T,B);A.children.push(I),o.set(I.groupId,A),A=A.children[A.children.length-1],$.push(A)}return A}function c(D,k,A,$,T){for(let F=k;F<=0;F++)$.pop();const E=$[$.length-1];if(!E)throw new Error("The group path is out of range");const B=D+k,I=i(T,B);return E.children.push(I),o.set(I.groupId,E),A=E.children[E.children.length-1],$.push(A),A}function f(D,k,A,$){A.pop();const T=A[A.length-1],E=i($,D);return T.children.push(E),o.set(E.groupId,T),k=T.children[T.children.length-1],A.push(k),k}function u(D,k,A,$,T,E){let B=D[D.length-1];if(!B)throw new Error("The group path is out of range");const I=k.get($)||0,F=k.get(A)||0;if(A<0||A===$)return D[D.length-1];const R=I-F,O=T&&T.relation!==void 0?T.relation:1;return B=R>0?p(F,R,B,D,O):B,B=R<0?c(F,R,B,D,O):B,B=R===0&&F>0&&I>0&&T&&E&&!!T.rBracket&&!!E.lBracket?f(F,B,D,O):B,B}function d(D){const A={relation:D.length&&D[0].relation!==void 0?D[0].relation:1,items:[],children:[],path:[],groupId:0,level:0},$=[A],T=l(D);return D.forEach((E,B)=>{const I=B-1,F=D[I],R=u($,T,I,B,F,E);R.items.push(E),n.set(E.conditionId,R)}),t.value=A,A}function m(){const D=r();n.set(D.conditionId,t.value),t.value.items.push(D)}function g(D){if(!D)return;const k=n.get(D.conditionId);if(k){const A=k.items.findIndex(T=>T.conditionId===D.conditionId)+1,$=r();n.set($.conditionId,k),k.items.splice(A,0,$),s()}}function h(D){const k=n.get(D.conditionId);k&&(k.items=k.items.filter(A=>A.conditionId!==D.conditionId),n.delete(D.conditionId),S(),s())}function y(D,k,A,$){D.reduce((T,E)=>{const B=E.conditionId!==void 0,I=E.groupId!==void 0;if(B){const F=E;A.push(F),T.items.set(F.conditionId,F)}if(I){const F=E;$.push(F),T.groups.set(F.groupId,F)}return T},k)}function v(D,k,A,$,T){D&&(D.items=k.length?D.items.filter(E=>!A.has(E.conditionId)):D.items,D.children=$.length?D.children.filter(E=>!T.has(E.groupId)):D.children)}function b(D,k,A){k.forEach($=>{D.items.push($),n.set($.conditionId,D)}),A.forEach($=>{D.children.push($),o.set($.groupId,D)})}function x(D){const k=D[0],A=k.conditionId!==void 0?n.get(k.conditionId):o.get(k.groupId),$={items:new Map,groups:new Map},T=[],E=[];if(A){y(D,$,T,E),v(A,T,$.items,E,$.groups);const B=i(A.relation,A.level+1);b(B,T,E),A.children.push(B),o.set(B.groupId,A),s()}}function C(D){const k=[...D.items],A=[...D.children],$=o.get(D.groupId);$&&($.children=$.children.filter(T=>T.groupId!==D.groupId),o.delete(D.groupId),k.forEach(T=>{$.items.push(T),n.set(T.conditionId,$)}),A.forEach(T=>{$.children.push(T),o.set(T.groupId,$)}),s())}function w(D){D.relation=D.relation===1?2:1,s()}let V;function N(D){const{relation:k}=D;return(D.children&&D.children.length?D.children.map(($,T,E)=>{const B=V($);return B[0].lBracket=(B[0].lBracket||"")+"(",B[B.length-1].rBracket=(B[B.length-1].rBracket||"")+")",B[B.length-1].relation=T<E.length-1?k:0,B}):[]).flat()}V=(D=t.value)=>{const{relation:k}=D,A=D.items.map((T,E,B)=>(T.lBracket=E===0?"(":"",T.rBracket=E===B.length-1?")":"",T.relation=E<B.length-1?k||1:0,T)),$=N(D);return[...A,...$]};function S(D){const k=D||t.value;if(k.children.length&&k.children.forEach(A=>{S(A)}),k.level===0&&!k.items.length&&k.children.length===1){const A=k.children[0];t.value.relation=A.relation,C(A)}else k.items.length===0&&k.children.length<=1&&C(k)}return{addCondition:m,changeGroupRelation:w,conditionGroupMap:n,getConditions:V,group:x,groupParentMap:o,insertConditionTo:g,loadConditionGroup:d,refresh:s,removeCondition:h,rootGroup:t,unGroup:C}}const Nw={install(t){t.component(_n.name,_n).component(Qo.name,Qo)}};function Sw(t,n){return{solutions:[{id:"default",code:"default",name:"默认筛选方案",conditions:n.map((r,i)=>{const{id:s,labelCode:l,name:p}=r,c=ii.Equal,f=si.Value;return{id:s,fieldCode:l,fieldName:p,compareType:c,valueType:f,value:{},conditionId:i}}),isPreset:!0,isDefault:!0,type:"",mode:"1"}]}}const Tw=new Map([["appearance",ge],["preset",Sw]]),Dw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/query-solution.schema.json",title:"query-solution",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a query solution",type:"string"},type:{description:"The type string of query solution component",type:"string",default:"query-solution"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},fields:{description:"",type:"array",default:[]},preset:{description:"",type:"array"},solutions:{description:"",type:"array"}}};function kw(t,n,o){return n}const Aw={title:"query-solution",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"},style:{description:"组件的内容样式",title:"style样式",type:"modal",showClearButton:!0},height:{description:"组件的高度",title:"高度(px)",type:"number",min:0,decimals:0}}},isControlInline:{description:"空间标签独占一行",type:"boolean",title:"空间标签独占一行"},filterText:{description:"筛选按钮文本",type:"string",title:"筛选按钮文本"},expanded:{description:"展开",type:"boolean",title:"展开",visible:{anyOf:[{isControlInline:{equal:!0}}]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{fields:{description:"筛选方案字段设置",title:"筛选方案字段",type:"",$converter:"",editor:{type:"query-solution-config"}}}}}},li={fields:{type:Array,default:[{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",labelCode:"id",code:"id",name:"标识",placeHolder:"",editor:{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",labelCode:"Version",code:"Version",name:"版本",placeHolder:"",editor:{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",type:"date-picker",require:!1,format:"yyyy-MM-dd",weekSelect:!1,startFieldCode:"Version",endFieldCode:"Version"}},{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",labelCode:"EmployeeID.EmployeeID",code:"EmployeeID",name:"创建人",placeHolder:"",editor:{type:"lookup",require:!1,uri:"",textField:"name",valueField:"id",idField:"id",helpId:"915a0b20-975a-4df1-8cfd-888c3dda0009",displayType:"List",loadTreeDataType:"default",enableFullTree:!1,editable:!1,mapFields:{code:"employeeID.employeeID_code",name:"employeeID.employeeID_name"},singleSelect:!0,pageSize:20,pageList:"10,20,30,50",expandLevel:-1,context:{enableExtendLoadMethod:!0}}},{id:"387679f1-4f61-40f3-8286-b3b55219a7aa",labelCode:"EmployeeID.EmployeeID_code",code:"code",name:"创建人工号",placeHolder:"",editor:{id:"387679f1-4f61-40f3-8286-b3b55219a7aa",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"f2878e6d-99a2-45e7-8678-3635b1e0ec2a",labelCode:"EmployeeID.EmployeeID_name",code:"name",name:"创建人",placeHolder:"",editor:{id:"f2878e6d-99a2-45e7-8678-3635b1e0ec2a",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",labelCode:"DomainID.DomainID",code:"DomainID",name:"业务部门",placeHolder:"",editor:{type:"lookup",require:!1,uri:"",textField:"name",valueField:"id",idField:"id",helpId:"b524a702-7323-4d46-998e-5ba0c6abcd49",displayType:"TreeList",loadTreeDataType:"default",enableFullTree:!1,editable:!1,dialogTitle:"",singleSelect:!0,enableCascade:!1,cascadeStatus:"enable",pageSize:20,pageList:"10,20,30,50",nosearch:!1,expandLevel:-1,context:{enableExtendLoadMethod:!0},quickSelect:{enable:!1,showMore:!0,showItemsCount:10}}},{id:"138082d4-9b07-4da2-9858-73861e0ac127",labelCode:"DomainID.DomainID_code",code:"code",name:"部门编号",placeHolder:"",editor:{id:"138082d4-9b07-4da2-9858-73861e0ac127",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"99587da0-8c9d-4efb-a196-f5762ba6000e",labelCode:"DomainID.DomainID_name",code:"name",name:"业务部门",placeHolder:"",editor:{id:"99587da0-8c9d-4efb-a196-f5762ba6000e",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",labelCode:"BillCode",code:"BillCode",name:"单据编号",placeHolder:"",editor:{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",tpye:"input-group",require:!1,editable:!0,groupText:"",usageMode:"text",modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]},groupTextUseLang:!0}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",labelCode:"TotalSum",code:"TotalSum",name:"订单金额",placeHolder:"",editor:{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",type:"number-spinner",require:!1,textAlign:"left",precision:2,isBigNumber:!1,maxValue:1e5,minValue:-1e5}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",labelCode:"BillType",code:"BillType",name:"订单类型",placeHolder:"",editor:{type:"combo-list",require:!1,valueType:"1",multiSelect:!0,data:[{value:"1",name:"1"},{value:"2",name:"2"},{value:"3",name:"3"}]}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",labelCode:"BillDate",code:"BillDate",name:"创建日期",placeHolder:"",editor:{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",type:"date-picker",require:!1,format:"yyyy-MM-dd",weekSelect:!1,startFieldCode:"BillDate",endFieldCode:"BillDate"}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",labelCode:"SecID",code:"SecID",name:"密级",placeHolder:"",editor:{type:"combo-list",require:!1,valueType:"1",multiSelect:!1,data:[{value:"a",name:"a"},{value:"b",name:"b"},{value:"c",name:"c"},{value:"d",name:"d"},{value:"e",name:"e"}]}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",labelCode:"SecLevel",code:"SecLevel",name:"密级",placeHolder:"",editor:{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",type:"number-range",require:!1,textAlign:"left",precision:0,isBigNumber:!1}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",labelCode:"ProjectID",code:"ProjectID",name:"所属项目",placeHolder:"",editor:{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",type:"button-edit",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",labelCode:"ProjectMrg",code:"ProjectMrg",name:"项目经理",placeHolder:"",editor:{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",type:"input-group",require:!1,modalConfig:{modalCmp:null,mapFields:null,showHeader:!0,title:"",showCloseButton:!0,showMaxButton:!0,width:800,height:600,showFooterButtons:!0,footerButtons:[]}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",labelCode:"AuditStatus",code:"AuditStatus",name:"订单状态",placeHolder:"",editor:{type:"radio-group",require:!1,valueType:"1",horizontal:!0,showLabel:!1,enumData:[{value:"1",name:"1"},{value:"2",name:"2"}]}}]},solutions:{type:Array,default:[{id:"c5df9edf-0e74-04b2-efb5-54572e1ab2e9",code:"Default",name:"默认筛选条件",mode:"1",type:"preset",conditions:[{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"EmployeeID.EmployeeID",fieldName:"制单人",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:13,content:{valueField:"id",value:[{id:"05701277-d0cf-bae1-a056-1d5ebe8ea9fa",code:"Sagi",name:"Sagi",userGroup:"0",sysOrgId:"001",tenantId:1e4,secLevel:"0",userType:0,note:null}],textValue:"Sagi"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:2,content:{value:[{id:"c4427472-95c6-e2c5-c3aa-ef6d537a1b33",code:"Inspur",name:"浪潮集团",treeinfo:{parentElement:"",sequence:2,layer:1,isDetail:!1}}],valueField:"id",textValue:"浪潮集团",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:15,content:{value:[],textValue:"",isInputText:!0}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[{value:"2",name:"2"}],key:"2"}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:1,content:{dateValue:"2023-09-01"}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[{value:"a",name:"a"},{value:"b",name:"b"}],key:"a,b"}}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",fieldCode:"SecLevel",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:123,endValue:213}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"订单状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:14,content:{value:"2"}}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",fieldCode:"ProjectID",fieldName:"所属项目",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{value:"dsfd "}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:6,content:{numValue:21333}}},{id:"d9b196a3-2bf0-46ba-8807-22f6ac62ad78",fieldCode:"ProjectMrg",fieldName:"项目经理",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{}}},{id:"2691b91b-1b5e-4eca-b802-ff5cc2ee7856",fieldCode:"Version",fieldName:"版本",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:4,content:{startTime:"2023-09-01",endTime:"2023-09-15"}}}],isPreset:!0,isDefault:!0,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"},{id:"3a491eb1-018e-e03e-d430-f05fccd894f3",code:"Order of The Month",name:"本月订单",mode:"1",type:"public",conditions:[{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"制单人",fieldName:"",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:13,content:{valueField:"",value:[],textValue:"help-text-value-null"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:2,content:{value:[],valueField:"",textValue:"help-text-value-null",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:15,content:{value:[],textValue:""}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:null,endValue:null}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[]}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:1,content:{dateValue:""}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:3,content:{value:[]}}},{id:"219c9c45-3bfb-4482-8755-1ea0d3c9475c",fieldCode:"SecLevel",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:5,content:{startValue:null,endValue:null}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"订单状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:14,content:{}}},{id:"01ca22ef-fbd4-4322-8e88-503edb9e071c",fieldCode:"ProjectID",fieldName:"所属项目",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,value:{type:0,content:{value:""}}}],isPreset:!1,isDefault:!1,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"},{id:"2120021b-df0c-0eef-d1d5-feaa78b01d7e",code:"Pending Orders of The Month",name:"本月待支付订单",mode:"2",type:"private",conditions:[{id:"e605c9f9-a252-48ca-9c65-0bffb3427e86",fieldCode:"id",fieldName:"标识",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:9,compareType:"0",relation:1,value:{type:0,content:{value:"123"}}},{id:"6f1bf2f5-7afc-42c5-81ee-b547db370be9",fieldCode:"AuditStatus",fieldName:"单据状态",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:6,compareType:"0",relation:1,lBracket:"(",value:{type:14,content:{value:"2"}}},{id:"2e6a0b5c-dd36-4bfd-ab3c-e3035f3a8e5a",fieldCode:"EmployeeID.EmployeeID",fieldName:"创建人",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:1,compareType:"0",relation:1,lBracket:"((",value:{type:13,content:{valueField:"id",value:[{id:"9e35953a-40fd-4a9a-922f-b9f59bf2a517",code:"sagi",name:"sagi",userGroup:"0",sysOrgId:"001",tenantId:1e4,secLevel:"PUBLIC",userType:3,note:null}],textValue:"sagi"}}},{id:"393c7ac7-64b2-4888-83a9-c1d8b2755339",fieldCode:"DomainID.DomainID",fieldName:"业务部门",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:2,compareType:"0",relation:1,rBracket:")",value:{type:2,content:{value:[{id:"1640d027-7531-2388-e5eb-6fe0ae8c9734",code:"SCM",name:"采购部",treeinfo:{parentElement:"001",sequence:2,layer:2,isDetail:!0}},{id:"001",code:"001",name:"销售部",treeinfo:{parentElement:"",sequence:1,layer:1,isDetail:!1}}],valueField:"id",textValue:"采购部,销售部",isInputText:!1}}},{id:"d9ace6f2-a77a-4b2b-9b3c-61154bb40848",fieldCode:"BillCode",fieldName:"单据编号",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:7,compareType:"0",relation:1,lBracket:"(",value:{type:15,content:{value:[],textValue:"123",isInputText:!0}}},{id:"3a8403c1-aa75-4091-947e-53f1d2bb8d4d",fieldCode:"TotalSum",fieldName:"订单金额",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:8,compareType:"0",relation:1,rBracket:")))",value:{type:6,content:{numValue:5}}},{id:"c7dbe607-bddc-4391-92e2-16f0221765df",fieldCode:"BillType",fieldName:"订单类型",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:3,compareType:"0",relation:1,lBracket:"(",value:{type:3,content:{value:[{value:"1",name:"1"}],key:"1"}}},{id:"d152e48d-13d1-4553-94fa-525fa67d4f2b",fieldCode:"BillDate",fieldName:"创建日期",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:4,compareType:"0",relation:1,lBracket:"(",value:{type:1,content:{dateValue:"2023-09-01"}}},{id:"abb7ef8e-ef19-4d83-99cc-1b7ff4f05345",fieldCode:"SecID",fieldName:"密级",valueType:0,placeHolder:"",beginPlaceHolder:"",endPlaceHolder:"",visible:!0,conditionId:5,compareType:"0",relation:1,rBracket:"))",value:{type:3,content:{value:[{value:"a",name:"a"},{value:"b",name:"b"},{value:"c",name:"c"}],key:"a,b,c"}}}],isPreset:!1,isDefault:!1,creatorCode:"sagi",creatorId:"sagi",creatorName:"sagi"}]},isControlInline:{type:Boolean,default:!0},filterText:{type:String,default:"筛选"},expanded:{type:Boolean,default:!0}},uf=me(li,Dw,Tw,kw,Aw);function $w(t,n){function o(a,r){return r.map(s=>(s.conditions=s.conditions.filter(l=>a.find(p=>p.labelCode===l.fieldCode)),s))}return{filterCondition:o}}const ci=e.defineComponent({name:"FQuerySolution",props:li,emits:["save","saveAs","delete","change","conditionChange"],setup(t,n){const o=e.ref(t.fields),a=e.ref(t.isControlInline),r=e.ref([]),i=$w(),{filterCondition:s}=i,l=e.ref(null);e.onMounted(()=>{r.value=s(t.fields,t.solutions),l.value=Ee.cloneDeep(r.value[0])});const p=e.computed(()=>l.value?l.value.mode:"1"),c={1:_n,2:Qo},f=e.computed(()=>l.value?l.value.name:""),u=e.computed(()=>!l.value||l.value.mode!=="2"),d=e.ref(!1),m=e.computed(()=>({"dropdown-menu":!0,show:d.value})),g=e.computed(()=>({"farris-panel":!0,"position-relative":!0,"query-solution":!0})),h=e.computed(()=>({border:"none"}));function y(T){l.value=T}function v(){if(!l.value){console.warn("no querysolution");return}l.value.conditions.forEach(T=>{T.value.clear()})}function b(){n.emit("save",l.value)}function x(){n.emit("saveAs",l.value)}function C(T,E){n.emit("change",T,E)}function w(T){n.emit("change",T)}function V(T,E){n.emit("change",T,E)}function N(){const T=r.value.map(E=>e.createVNode("li",{class:"dropdown-item",onClick:()=>y(E)},[E.name]));return T.push(e.createVNode("li",{class:"solution-header-title-btns"},[e.createVNode("span",{class:"dropdown-item-btn ",onClick:b},[e.createTextVNode("保存")]),e.createVNode("span",{class:"dropdown-item-btn ml-2 mr-2",onClick:x},[e.createTextVNode("另存为")])])),e.createVNode("ul",{class:m.value},[T])}function S(){d.value=!d.value}function D(){return e.createVNode("div",null,null)}function k(){return e.createVNode("div",{class:"solution-action"},[e.createVNode("div",{class:"btn-group"},[e.createVNode("button",{type:"button",class:"btn btn-primary "},[e.createTextVNode("查询")])]),u.value&&e.createVNode("div",{class:"icon-group ml-2"},[e.createVNode("span",{class:"icon-group-remove",onClick:v,title:"清空"},[e.createVNode("span",{class:"f-icon f-icon-remove"},null)])])])}function A(){return e.createVNode("div",{class:"solution-header"},[e.createVNode("div",{class:"btn-group mr-3",onClick:S},[e.createVNode("div",{class:"solution-header-title"},[f.value,e.createVNode("span",{class:"f-icon f-accordion-expand"},null)]),N()]),D(),k()])}function $(){const T=c[p.value]||_n;return l.value&&e.createVNode(T,{key:l.value.id,fields:o.value,conditions:l.value.conditions,isControlInline:a.value,onValueChange:(E,B)=>C(E,B),onLabelCodeChange:E=>w(E),onCompareTypeChange:(E,B)=>V(E,B)},null)}return()=>e.createVNode("div",{class:g.value,tabindex:"1",style:h.value},[A(),$()])}}),Ew=e.defineComponent({name:"FQuerySolutionDesign",props:li,emits:["save","saveAs"],setup(t,n){const o=e.ref(t.fields),a=e.ref(t.solutions[0]),r=e.ref(),i=e.inject("design-item-context"),s=ye(r,i);e.onMounted(()=>{r.value.componentInstance=s}),n.expose(s.value);const l=e.computed(()=>a.value.name||""),p=e.computed(()=>a.value.mode!=="2"),c=e.computed(()=>({"farris-panel":!0,"position-relative":!0,"query-solution":!0})),f=e.computed(()=>({border:"none"}));function u(){return e.createVNode("div",{class:"solution-action"},[e.createVNode("div",{class:"btn-group"},[e.createVNode("button",{type:"button",class:"btn btn-primary "},[e.createTextVNode("查询")])]),p.value&&e.createVNode("div",{class:"icon-group ml-2"},[e.createVNode("span",{class:"icon-group-remove",title:"清空"},[e.createVNode("span",{class:"f-icon f-icon-remove"},null)])])])}function d(){return e.createVNode("div",{class:"solution-header"},[e.createVNode("div",{class:"btn-group mr-3"},[e.createVNode("div",{class:"solution-header-title"},[l.value,e.createVNode("span",{class:"f-icon f-accordion-expand"},null)])]),u()])}function m(){const g=_n;return e.createVNode(g,{fields:o.value,conditions:a.value.conditions},null)}return()=>e.createVNode("div",{ref:r,class:c.value,tabindex:"1",style:f.value},[d(),m()])}}),ff={install(t){t.component(ci.name,ci),t.component(ko.name,ko)},register(t,n,o){t["query-solution"]=ci,t["query-solution-config"]=ko,n["query-solution"]=uf,n["query-solution-config"]=Rx},registerDesigner(t,n,o){t["query-solution"]=Ew,n["query-solution"]=uf}},Bw=e.defineComponent({name:"FRadioGroupDesign",props:$r,emits:["changeValue","update:modelValue"],setup(t,n){const o=e.ref(t.modelValue),{enumData:a,onClickRadio:r,getValue:i,getText:s}=lu(t,n,o),l=e.computed(()=>({"farris-checkradio-hor":t.horizontal})),p=e.ref(),c=e.inject("design-item-context"),f=ye(p,c);return e.onMounted(()=>{p.value.componentInstance=f}),n.expose(f.value),()=>e.createVNode("div",{class:["farris-input-wrap",l.value],ref:p},[a.value.map((u,d)=>{const m="radio_"+t.name+d;return e.createVNode("div",{class:"custom-control custom-radio"},[e.createVNode("input",{type:"radio",class:"custom-control-input",name:t.name,id:m,value:i(u),checked:i(u)===o.value,disabled:t.disabled,tabindex:t.tabIndex,onClick:g=>r(u,g)},null),e.createVNode("label",{class:"custom-control-label",for:m},[s(u)])])})])}}),pf={install(t){t.component(Ao.name,Ao)},register(t,n,o){t["radio-group"]=Ao,n["radio-group"]=su},registerDesigner(t,n,o){t["radio-group"]=Bw,n["radio-group"]=su}},Fw=new Map([["appearance",ge]]);function Iw(t,n,o){return n}const Mw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/rate.schema.json",title:"rate",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for rate",type:"string"},type:{description:"The type string of rate",type:"string",default:"rate"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Ow={title:"rate",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},di={size:{type:String,default:"large"},enableHalf:{type:Boolean,default:!1},enableClear:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},pointSystem:{type:Number,default:5},lightColor:{type:String,default:""},darkColor:{type:String,default:""},iconClass:{type:String,default:"f-icon-star"},numOfStar:{type:Number,default:5},toolTipDisabled:{type:Boolean,default:!0},toolTipContents:{type:Array,default:["很不满意","不满意","一般","满意","非常满意"]},enableScore:{type:Boolean,default:!0},enableSatisfaction:{type:Boolean,default:!1},value:{type:Number,default:0},modelValue:{type:Number,default:0}},mf=me(di,Mw,Fw,Iw,Ow),Lo=e.defineComponent({name:"FRate",props:di,emits:["selectedValue","update:modelValue"],setup(t,n){const o=e.ref(t.size),a=e.ref(t.enableHalf),r=e.ref(t.enableClear),i=e.ref(t.disabled),s=e.ref(t.pointSystem),l=e.ref(t.lightColor),p=e.ref(t.darkColor),c=e.ref(t.iconClass),f=e.ref(t.numOfStar),u=e.ref(t.toolTipDisabled),d=e.ref(t.toolTipContents),m=e.ref(t.enableScore),g=e.ref(t.enableSatisfaction);let h;const y=e.ref(0),v=e.ref(0),b=e.ref(0),x=e.ref(t.modelValue);let C=1,w,V,N;const S=4;e.onMounted(()=>{});function D(){const O=f.value;N=[];for(let W=1;W<=O;W++)N.push({id:W})}function k(){let O;a.value?O=Math.ceil(x.value/C):O=x.value,v.value=(h*x.value+Math.floor(x.value)*S)/C,w=d.value[O-1]}function A(){switch(o.value){case"small":h=14;break;case"middle":h=16;break;case"large":h=18;break;case"extraLarge":h=24;break}D(),f.value&&(C=s.value/f.value),x.value&&k()}A();function $(O){return O.className.indexOf("f-icon")!==-1}function T(){return y.value===v.value&&r.value&&v.value!==0?(v.value=0,x.value=0,V=null,y.value=0,b.value=0,n.emit("selectedValue",x.value),n.emit("update:modelValue",x.value),!0):!1}function E(O,W,M){if(O.movementX||O.movementY){if(i.value)return;g.value&&(w=d.value[W-1]),O.offsetX<h/2&&a.value===!0?(y.value=h*W-h/2+S*(W-1),b.value=C*W-C/2):(y.value=h*W+S*(W-1),b.value=C*W)}if(M===!0){if(T())return;x.value=b.value,v.value=y.value,V=w,n.emit("update:modelValue",x.value),n.emit("selectedValue",x.value)}}function B(O,W){var M;if($(O.target)&&O.target){const _=parseInt((M=O.target)==null?void 0:M.id);E(O,_,W)}}const I=e.computed(()=>b.value?b.value+"分":x.value+"分"),F=e.computed(()=>({width:(y.value||v.value)+"px"}));function R(){y.value=0}return e.watch(()=>t.modelValue,O=>{x.value=O,k()}),()=>e.createVNode("div",{class:"farris-star-rating",onMouseover:e.withModifiers(O=>B(O,!1),["prevent"]),onMousemove:e.withModifiers(O=>B(O,!1),["prevent"]),onMouseleave:e.withModifiers(O=>R(),["prevent"]),onClick:e.withModifiers(O=>B(O,!0),["prevent"])},[e.createVNode("div",{class:"star-light-area",style:F.value},[N.map(O=>e.createVNode("span",{class:["f-icon default-light-color ",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"},{disabled:u.value}],id:O.id,style:{color:l.value}},null))]),e.createVNode("div",{class:["star-dark-area",{small:o.value==="small"},{middle:o.value==="middle"},{large:o.value==="large"}]},[N.map(O=>e.createVNode("span",{class:["f-icon default-dark-color",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"}],id:O.id,style:{color:p.value}},null))]),e.createVNode("div",{class:["f-utils-fill",{"font-small":o.value==="small"},{"font-middle":o.value==="middle"},{"font-large":o.value==="large"},{"font-exlarge":o.value==="extraLarge"}]},[m.value&&e.createVNode("span",null,[e.createTextVNode(" "),I.value,e.createTextVNode(" ")]),g.value&&(V||w)&&e.createVNode("span",null,[e.createTextVNode(" "),w||V])])])}}),Pw=e.defineComponent({name:"FRateDesign",props:di,emits:["selectedValue"],setup(t,n){const o=e.ref(t.size),a=e.ref(t.enableHalf),r=e.ref(t.enableClear),i=e.ref(t.disabled),s=e.ref(t.pointSystem),l=e.ref(t.lightColor),p=e.ref(t.darkColor),c=e.ref(t.iconClass),f=e.ref(t.numOfStar),u=e.ref(t.toolTipDisabled),d=e.ref(t.toolTipContents),m=e.ref(t.enableScore),g=e.ref(t.enableSatisfaction);let h;const y=e.ref(1);let v=0;const b=e.ref(0),x=e.ref(0);let C=1,w,V,N;const S=4,D=e.ref(),k=e.inject("design-item-context"),A=ye(D,k);e.onMounted(()=>{D.value.componentInstance=A}),n.expose(A.value),e.onMounted(()=>{});function $(){const M=f.value;N=[];for(let _=1;_<=M;_++)N.push({id:_})}function T(){let M;a.value?M=Math.ceil(x.value/C):M=x.value,v=(h*x.value+Math.floor(x.value)*S)/C,w=d.value[M-1]}function E(){switch(o.value){case"small":h=14;break;case"middle":h=16;break;case"large":h=18;break;case"extraLarge":h=24;break}$(),f.value&&(C=s.value/f.value),x.value&&T()}E();function B(M){return M.className.indexOf("f-icon")!==-1}function I(){return y.value===v&&r&&v!==0?(v=0,x.value=0,V=null,y.value=0,b.value=0,n.emit("selectedValue",x.value),!0):!1}function F(M,_,H){if(M.movementX||M.movementY){if(i.value)return;g.value&&(w=d.value[_-1]),M.offsetX<h/2&&a.value===!0?(y.value=h*_-h/2+S*(_-1),b.value=C*_-C/2):(y.value=h*_+S*(_-1),b.value=C*_)}if(H===!0){if(I())return;x.value=b.value,v=y.value,V=w,n.emit("selectedValue",x.value)}}function R(M,_){if(B(M.target)&&M.target){const H=parseInt(M.target.id);F(M,H,_)}}const O=e.computed(()=>b.value?b.value+"分":x.value+"分"),W=e.computed(()=>({width:(y.value||v)+"px"}));return()=>e.createVNode("div",{class:"farris-star-rating",ref:D,onMouseover:e.withModifiers(M=>R(M,!1),["prevent"]),onMousemove:e.withModifiers(M=>R(M,!1),["prevent"]),onMouseout:e.withModifiers(M=>R(M,!1),["prevent"]),onClick:e.withModifiers(M=>R(M,!0),["prevent"])},[e.createVNode("div",{class:"star-light-area",style:W.value},[N.map(M=>e.createVNode("span",{class:["f-icon default-light-color ",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"},{disabled:u.value}],id:M.id,style:{color:l.value}},null))]),e.createVNode("div",{class:["star-dark-area",{small:o.value==="small"},{middle:o.value==="middle"},{large:o.value==="large"}]},[N.map(M=>e.createVNode("span",{class:["f-icon default-dark-color",c.value,{"f-star-sm":o.value==="small"},{"f-star-md":o.value==="middle"},{"f-star-lg":o.value==="large"},{"f-star-exlarge":o.value==="extraLarge"}],id:M.id,style:{color:p.value}},null))]),e.createVNode("div",{class:["f-utils-fill",{"font-small":o.value==="small"},{"font-middle":o.value==="middle"},{"font-large":o.value==="large"},{"font-exlarge":o.value==="extraLarge"}]},[m.value&&e.createVNode("span",null,[e.createTextVNode(" "),O.value,e.createTextVNode(" ")]),g.value&&(V||w)&&e.createVNode("span",null,[e.createTextVNode(" "),w||V])])])}}),hf={install(t){t.component(Lo.name,Lo)},register(t,n,o){t.rate=Lo,n.rate=mf},registerDesigner(t,n,o){t.rate=Pw,n.rate=mf}},gf=new Map([["appearance",ge]]);function _w(t,n,o){return o.splitter&&(n.contents=String(o.splitter).split(":").map(a=>{const r=t.getSchemaByType("response-layout-item");return r.appearance={class:`h-100 col-${a} px-0`},r})),n}const Rw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout.schema.json",title:"response-layout",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout",type:"string"},type:{description:"The type string of Respnse Layout component",type:"string",default:"response-layout"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},Lw={title:"responseLayout",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"ResponseLayout",enum:[]}}}},appearance:{description:"",title:"外观",properties:{appearance:{description:"",type:"cascade",title:"外联样式",properties:{class:{description:"组件的CSS样式",title:"class样式",type:"string"}}},appearanceStyle:{description:"样式",type:"cascade",title:"内联样式",properties:{inlineStyle:{description:"",title:"inlineStyle",type:"custom"}}}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}},layout:{description:"",title:"布局",properties:{layout:{description:"配置布局容器内区块个数及比例",type:"custom",title:"是否可见",editor:{},editorParams:{layout:[]}}}}}},ui={customClass:{type:String,default:""}},yf=me(ui,Rw,gf,_w,Lw),fi=e.defineComponent({name:"FResponseLayout",props:ui,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}}),Hw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-item.schema.json",title:"response-layout-item",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Respnse Layout Item",type:"string"},type:{description:"The type string of Respnse Layout Item component",type:"string",default:"response-layout-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},visible:{description:"",type:"boolean",default:!0}},required:["id","type","contents"]},pi={customClass:{type:String,default:""}},bf=me(pi,Hw,gf),Ho=e.defineComponent({name:"FResponseLayoutItem",props:pi,emits:[],setup(t,n){return()=>e.createVNode("div",{class:t.customClass},[n.slots.default&&n.slots.default()])}}),jw=e.defineComponent({name:"FResponseLayoutDesign",props:ui,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return r.value.canNested=!1,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{ref:o,class:"d-flex response-layout"},[n.slots.default&&n.slots.default()])}}),Ww=e.defineComponent({name:"FResponseLayoutItemDesign",props:pi,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return r.value.canNested=!1,r.value.canMove=!1,r.value.canDelete=!1,e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode(Ho,{ref:o},{default:()=>[n.slots.default&&n.slots.default()]})}}),vf={install(t){t.component(fi.name,fi).component(Ho.name,Ho)},register(t,n,o){t["response-layout"]=fi,t["response-layout-item"]=Ho,n["response-layout"]=yf,n["response-layout-item"]=bf},registerDesigner(t,n,o){t["response-layout"]=jw,t["response-layout-item"]=Ww,n["response-layout"]=yf,n["response-layout-item"]=bf}},xf={defaultState:{defaultGroupNumber:3,mode:"standard"},importData:[{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:2,label:"编号",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"标签",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"收件方",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:12,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:1,displayWidthInEL:6,label:"送达方",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"人员",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"邮寄地址",componentRow:0,showTopBorder:0,group:1},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"电话号码",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"负责人",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"邮箱",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"发件日期",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"收件日期",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:12,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:6,label:"件数",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:6,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:2,displayWidthInEL:2,label:"售达方",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:12,columnInLG:6,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:2,displayWidthInEL:3,label:"本位币",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:3,columnInEL:2,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:1,displayWidthInEL:1,label:"收款本币金额长标题",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:3,label:"汇率",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:1,label:"现金流项目",componentRow:0,showTopBorder:0,group:2},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:1,label:"摘要",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:2,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:1,label:"制单人",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:6,columnInLG:9,columnInEL:4,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:3,displayWidthInEL:2,label:"结算方式",componentRow:0,showTopBorder:0,group:3},{columnInSM:12,columnInMD:6,columnInLG:6,columnInEL:6,displayWidthInSM:1,displayWidthInMD:1,displayWidthInLG:2,displayWidthInEL:3,label:"当前汇率",componentRow:0,showTopBorder:0,group:4},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:3,label:"本国汇率",componentRow:0,showTopBorder:0,group:4},{columnInSM:12,columnInMD:12,columnInLG:9,columnInEL:6,displayWidthInSM:1,displayWidthInMD:2,displayWidthInLG:3,displayWidthInEL:3,label:"他国汇率",componentRow:0,showTopBorder:0,group:4}]},qw={initialState:{type:Object,default:xf},height:{type:Number,default:700},width:{type:Number,default:750}},zw={defaultStates:{type:Object,default:{mode:""}},onSwitchInStandardModeChanged:{type:Function,default:()=>{}},onCurrentScreenResolutionChanged:{type:Function,default:()=>{}},onScreenNameChanged:{type:Function,default:()=>{}}},Gw=new Map([["appearance",ge]]),Uw={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/switch.schema.json",title:"switch",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a switch",type:"string"},type:{description:"The type string of switch component",type:"string",default:"switch"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function Yw(t,n,o){return n}const Zw={title:"switch",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},mi={modelValue:{type:Boolean,default:!1},disable:{type:Boolean},onBackground:{type:String},offBackground:{type:String},onColor:{type:String},offColor:{type:String},onLabel:{type:String},offLabel:{type:String},size:{type:String,default:"medium"},onModelValueChanged:{type:Function,default:()=>{}}},Cf=me(mi,Uw,Gw,Yw,Zw),jo=e.defineComponent({name:"FSwitch",props:mi,emits:["update:modelValue","modelValueChanged"],setup(t,n){const{disable:o,size:a,onLabel:r,offLabel:i,onBackground:s,offBackground:l,onColor:p,offColor:c}=e.toRefs(t),f=e.ref(t.modelValue),u=e.computed(()=>({switch:!0,"f-cmp-switch":!0,checked:f.value,disabled:o.value,"switch-large":a.value==="large","switch-medium":a.value==="medium","switch-small":a.value==="small"})),d=e.computed(()=>f.value?{outline:"none",background:s.value}:{outline:"none",backgroundColor:l.value}),m=e.computed(()=>f.value?{background:p.value}:{backgroundColor:c.value}),g=e.computed(()=>(r==null?void 0:r.value)||(i==null?void 0:i.value));function h(){o.value||(f.value=!f.value,n.emit("update:modelValue",f.value))}return e.watch(f,(y,v)=>{y!==v&&n.emit("modelValueChanged",y)}),()=>e.createVNode("span",{tabindex:"0",role:"button",class:u.value,style:d.value,onClick:h},[g.value&&e.createVNode("span",{class:"switch-pane"},[e.createVNode("span",{class:"switch-label-checked"},[r==null?void 0:r.value]),e.createVNode("span",{class:"switch-label-unchecked"},[i==null?void 0:i.value])]),e.createVNode("small",{style:m.value},[n.slots.default&&n.slots.default()])])}}),Kw=e.defineComponent({name:"FScreenResolutionSelector",props:zw,emits:["screenNameChanged","currentScreenResolutionChanged","switchInStandardModeChanged"],setup(t,n){const o=e.ref([{name:"小屏幕",code:"SM",value:"SM",active:!1},{name:"中等屏幕",code:"MD",value:"MD",active:!0},{name:"大屏幕",code:"LG",value:"LG",active:!1},{name:"极大屏幕",code:"EL",value:"EL",active:!1}]),a=e.ref(t.defaultStates),r=e.ref("MD"),i=e.ref("中等屏幕"),s=e.ref(!1);function l(f){o.value.forEach(u=>{u.active=u.code===f,u.active&&(r.value=u.code,i.value=u.name,n.emit("screenNameChanged",i.value),n.emit("currentScreenResolutionChanged",r.value))})}function p(){n.emit("switchInStandardModeChanged",s.value)}e.onBeforeMount(()=>{a.value.mode==="standard"?(s.value=!0,p()):s.value=!1});function c(){return e.createVNode(Vn,{class:"f-layout-editor-screen-resolution-selector-frame",items:o.value,modelValue:r.value,"onUpdate:modelValue":f=>r.value=f,onChange:l},null)}return()=>e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-header"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-form"},[e.createTextVNode("表单布局配置")])]),c(),e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-switch"},[e.createVNode(jo,{class:"f-layout-editor-show-switch",modelValue:s.value,"onUpdate:modelValue":f=>s.value=f,onModelValueChanged:p},null),s.value?e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("标准模式")]):e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("自定义模式")])])])}}),Qw={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},currentArea:{type:Object,default:[]},twoDimensionalArray:{type:Array,default:[]}},Xw={item:{type:Object,default:{}},currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1}},Jw=e.defineComponent({name:"FColumnWidthView",props:Xw,emits:[],setup(t,n){const o=e.ref(t.item),a=e.ref(t.currentScreenResolution),r=e.computed(()=>`col-${o.value[`columnIn${a.value}`]}`);return e.watch([()=>t.item,()=>t.currentScreenResolution],([i,s],[l,p])=>{i!==l&&(o.value=i),s!==p&&(a.value=s)}),()=>e.createVNode("div",{class:r.value},[e.createVNode("div",{class:"f-layout-editor-column-width-view",title:o.value.label},[e.createVNode("div",{class:"f-layout-editor-column-width-view-label"},[o.value.label])])])}}),eV=e.defineComponent({name:"FPreview",props:Qw,emits:["update:twoDimensionalArray"],setup(t,n){const o=e.ref(t.currentScreenResolution),a=e.ref(t.switchInStandardMode),r=e.ref(t.currentArea),i=e.ref(t.twoDimensionalArray),s=e.ref([]);e.watch([()=>t.currentArea,()=>t.switchInStandardMode,()=>t.currentScreenResolution],([u,d,m],[g,h,y])=>{u!==g&&(r.value=u),d!==h&&(a.value=d),m!==y&&(o.value=m)}),e.watch(()=>t.twoDimensionalArray,()=>{i.value=t.twoDimensionalArray,l()}),e.onMounted(()=>{l()});function l(){s.value=Ee.cloneDeep(i.value),s.value=p()}function p(){const u=[];let d=1;return s.value.forEach(m=>{const g=c(m,d);d+=g.length,u.push(g)}),u}function c(u,d){const m=[];let g=[];return u.forEach(h=>{d!==h.componentRow&&(d+=1,m.push(g),g=[]),g.push(h)}),m.push(g),m}function f(){if(a.value)return"";const u=Array.from({length:12},()=>e.createVNode("div",{class:"col-1"},[e.createVNode("div",{class:"f-layout-editor-preview-customize-single-background"},[e.createTextVNode(" ")])]));return e.createVNode("div",{class:"f-layout-editor-preview-customize-whole-background"},[u])}return()=>e.createVNode("div",{class:"f-layout-editor-preview f-utils-fill-flex-column"},[e.createVNode("div",{class:"f-layout-editor-preview-header"},[e.createTextVNode("预览区")]),f(),e.createVNode("div",{class:"f-layout-editor-preview-view f-utils-overflow-xhya"},[e.createVNode("div",{class:"f-layout-editor-preview-row-group"},[s.value.map(u=>{var d,m;return((d=u[0][0])==null?void 0:d.group.toString())===((m=r.value[0])==null?void 0:m.id)&&u.map(g=>e.createVNode("div",{class:"f-layout-editor-row"},[g.map(h=>e.createVNode(Jw,{item:h,"onUpdate:item":y=>h=y,currentScreenResolution:o.value,switchInStandardMode:a.value},null))]))})])])])}}),tV={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},originalData:{type:Array,default:[]},originalDataCopy:{type:Array,default:[]},defaultStates:{type:Object,default:{}},onTwoDimensionalArrayChanged:{type:Function,default:()=>{}},onOriginalDataChanged:{type:Function,default:()=>{}}};function nV(t,n){const o=e.ref(-1),a=e.ref(!1);function r(u){if(u.target.offsetParent){const d=u.target.offsetParent,m=d.offsetWidth-u.target.offsetWidth/2-4,g=d.offsetHeight/2;u.dataTransfer&&u.dataTransfer.setDragImage(d,m,g)}}function i(u){if(u){const d=t.value.findIndex(m=>m.label===u.label);setTimeout(()=>{o.value=d,a.value=!0,u.moving=!0})}}function s(u,d){u.stopPropagation(),r(u),i(d)}function l(u){const d=t.value.findIndex(m=>m.label===u.label);if(o.value!==d){const m=t.value[o.value],g=t.value;g.splice(o.value,1),g.splice(d,0,m),o.value=d,n&&n()}}function p(u,d){u.preventDefault(),l(d)}function c(u){u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="move")}function f(u,d){d&&(d.moving=!1),a.value=!1}return{dragstart:s,dragenter:p,dragover:c,dragend:f,isDragging:a}}const oV={currentScreenResolution:{type:String,default:""},field:{type:Object,default:{}},switchInStandardMode:{type:Boolean,default:!1},fieldChanged:{type:Function,default:()=>{}}},aV=new Map([["appearance",ge]]);function rV(t,n,o){return n}const iV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-button.schema.json",title:"radio-button",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for radio-button",type:"string"},type:{description:"The type string of radio-button",type:"string",default:"radio-button"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},sV={title:"radio-button",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},hi={enumData:{type:Array,default:[{text:"1",active:!0}]},suffixValue:{type:String,default:""},onSelectedValueChanged:{type:Function,default:()=>{}}},wf=me(hi,iV,aV,rV,sV),Wo=e.defineComponent({name:"FRadioButton",props:hi,emits:["selectedValueChanged"],setup(t,n){const o=e.ref(t.enumData);function a(i,s){if(i.currentTarget.classList.value="btn btn-secondary active",i.currentTarget.tagName.toLowerCase()==="label"){const{currentTarget:l}=i,p=l.parentElement;Array.from(p.querySelectorAll("label")).filter(f=>f!==l).forEach(f=>f.classList.remove("active"))}n.emit("selectedValueChanged",s)}function r(i){return`${i.text}${t.suffixValue}`}return e.watch(()=>t.enumData,(i,s)=>{i!==s&&(o.value=t.enumData)}),()=>e.createVNode("div",{class:"f-radio-button"},[e.createVNode("div",{class:["farris-input-wrap"]},[o.value.map((i,s)=>e.createVNode(e.Fragment,null,[e.createVNode("label",{class:i.active?"btn btn-secondary active":"btn btn-secondary",onClick:l=>a(l,i)},[e.createVNode("span",{class:"f-radio-button-text"},[r(i)])])]))])])}}),lV=e.defineComponent({name:"FColumnWidthEditor",props:oV,emits:["fieldChanged"],setup(t,n){const o={SM:["1"],MD:["1","2"],LG:["1","2","3","4"],EL:["1","2","3","4","5","6"]},a=e.ref(t.currentScreenResolution),r=e.ref(t.field),i=e.ref(t.switchInStandardMode),s=e.ref(),l=e.ref(""),p=e.ref(),c=e.ref("customize"),f=e.ref(),u=e.inject("ResponseLayoutEditorDraggableComposition"),{dragstart:d,dragenter:m,dragover:g,dragend:h}=u;function y(){s.value=o==null?void 0:o[a.value],i.value?(l.value=`displayWidthIn${a.value}`,c.value=`${r.value[l.value]}`):(l.value=`columnIn${a.value}`,f.value=r.value[l.value])}function v(D){if(i.value===!0){const k=Number(D==null?void 0:D.text);p.value=k;const A=r.value[`columnIn${a.value}`]/r.value[`displayWidthIn${a.value}`];r.value[`columnIn${a.value}`]=k*A,r.value[`displayWidthIn${a.value}`]=Number(k),n.emit("fieldChanged",r.value)}}function b(D){f.value=D;const k=r.value[`columnIn${a.value}`]/r.value[`displayWidthIn${a.value}`];r.value[`columnIn${a.value}`]=f.value,r.value[`displayWidthIn${a.value}`]=f.value/k,n.emit("fieldChanged",r.value)}function x(){return e.createVNode(Lo,{enableHalf:!0,size:"extraLarge",pointSystem:12,numOfStar:6,lightColor:"#5D89FE",darkColor:"#e7e9f3",iconClass:"f-icon-column-rectangle",modelValue:f.value,"onUpdate:modelValue":D=>f.value=D,enableScore:!1,onSelectedValue:()=>b(f.value)},null)}function C(){const D=[];s.value=o==null?void 0:o[a.value];const k=r.value[`displayWidthIn${a.value}`];return s.value.forEach(A=>{const $={text:A,active:k.toString()===A};D.push($)}),D}function w(){const D=C();return e.createVNode(Wo,{enumData:D,suffixValue:"列",onSelectedValueChanged:v},{default:()=>[e.createTextVNode(" ")]})}function V(){var D;if(((D=r==null?void 0:r.value)==null?void 0:D.showTopBorder)===1)return e.createVNode("div",{class:"f-layout-editor-column-width-editor-row"},[e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-left"},null),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-middle"},[e.createTextVNode("第"),r.value.componentRow,e.createTextVNode("行")]),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-right"},null)])}function N(){return i.value?e.createVNode("div",{class:"f-column-width-editor-switch-standard"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-click-button"},[w()])]):e.createVNode("div",{class:"f-column-width-editor-switch-customize",onDragenter:D=>m(D,r.value),onDragend:D=>h(D,r.value),onDragover:D=>g(D)},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-rectangle"},[x(),e.createVNode("div",{class:"f-layout-editor-rate-show-column"},[f.value,e.createTextVNode("列")]),e.createVNode("span",{class:"f-layout-editor-drag-handler f-icon f-icon-drag-vertical",draggable:"true",onDragstart:D=>d(D,r.value)},null)])])}function S(){var D;return e.createVNode("div",{class:"f-layout-editor-column-width-editor-component"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-label"},[(D=r==null?void 0:r.value)==null?void 0:D.label]),N()])}return e.watch(()=>[t.field,t.switchInStandardMode,t.currentScreenResolution],([D,k,A],[$,T,E])=>{A!==E&&(a.value=A,s.value=o[a.value],y()),k!==T&&(i.value=k),i.value===!1&&y(),D!==$&&(r.value=D)}),e.onMounted(()=>{y()}),()=>e.createVNode("div",{class:"f-layout-editor-column-width-editor"},[V(),S()])}}),cV=e.defineComponent({name:"FFieldList",props:tV,emits:["update:currentArea","twoDimensionalArrayChanged","originalDataChanged"],setup(t,n){const o=e.ref(t.currentScreenResolution),a=e.ref(t.switchInStandardMode),r=e.ref(t.originalData),i=e.ref(t.originalDataCopy),s=e.ref(t.defaultStates),l=e.ref(""),p=e.ref([]),c=e.ref(t.currentArea),f=e.ref(0),u=e.ref(),d=e.ref(0),m=e.ref("1"),g=e.ref([]);function h(){var B;let E=y();for(let I=0;I<E.length;I++){const F={id:(B=E[I])==null?void 0:B.toString(),label:"区域"+E[I]};p.value.push(F)}v()}function y(){let E=[];return r.value.forEach(B=>{E.indexOf(B.group)===-1&&E.push(B.group)}),E}function v(){m.value=s.value.defaultGroupNumber.toString(),l.value=`区域${m.value}`,c.value=[p.value[Number(m.value)-1]],n.emit("update:currentArea",c.value)}function b(){let E=[];u.value=[];let B=1;r.value.forEach(I=>{I.group===B||(B+=1,u.value.push(E),E=[]),E.push(I)}),u.value.push(E)}function x(){u.value[c.value[0].id-1]=Ee.cloneDeep(g.value);let E=[];d.value=0,u.value.forEach(B=>{let I=w(B,d.value);E.push(I),d.value=I[I.length-1].componentRow}),V(E)}function C(){b();let E=[];return d.value=0,u.value.forEach(B=>{let I=w(B,d.value);E.push(I),d.value=I[I.length-1].componentRow}),n.emit("twoDimensionalArrayChanged",u.value),V(E),r.value}function w(E,B){let F=12;return f.value=1+B,E.forEach(R=>{R.showTopBorder=0;let O=R[`columnIn${o.value}`];F>=O?(R.componentRow=f.value,F-=O):(f.value+=1,R.componentRow=f.value,F=12-O,R.showTopBorder=1)}),E[0].showTopBorder=1,E}function V(E){let B=[];for(let I of E)B=B.concat(I);r.value=Ee.cloneDeep(B),d.value=0}function N(){return e.createVNode("div",{class:"f-layout-editor-field-list-top"},[e.createVNode("div",{class:"f-layout-editor-field-list-header"},[e.createTextVNode("组件列表")]),e.createVNode("div",{class:"f-layout-editor-choose-group"},[e.createVNode(rt,{modelValue:m.value,"onUpdate:modelValue":E=>m.value=E,placeholder:"当前可编辑组",enableClear:!1,"id-field":"id","text-field":"label",data:p.value,editable:!1,onChange:$},null)])])}function S(){return e.createVNode("div",{class:"f-layout-editor-field-list-content f-utils-overflow-xhya"},[g.value.map(E=>e.createVNode(lV,{key:E.label,currentScreenResolution:o.value,field:E,"onUpdate:field":B=>E=B,switchInStandardMode:a.value,"onUpdate:switchInStandardMode":B=>a.value=B,onFieldChanged:D},null))])}function D(E){g.value.forEach(B=>{B.label==E.label&&Object.assign(B,E)}),x(),A(),k()}function k(){g.value=[],r.value.forEach(E=>{E.group===Number(c.value[0].id)&&g.value.push(E)})}function A(){r.value=Ee.cloneDeep(C()),n.emit("originalDataChanged",r.value)}function $(E){for(let B=0;B<E.length;B++)c.value=[{id:E[B].id,label:E[B].label}];n.emit("update:currentArea",c.value),k(),x()}const T=nV(g,()=>{x(),A(),k()});return e.provide("ResponseLayoutEditorDraggableComposition",T),e.watch(()=>t.currentArea,(E,B)=>{E!==B&&(c.value=t.currentArea,k())}),e.watch(c,(E,B)=>{E!==B&&k()}),e.watch(()=>t.currentGroup,(E,B)=>{E!==B&&(l.value=t.currentGroup)}),e.watch(()=>t.currentScreenResolution,(E,B)=>{E!==B&&(o.value=t.currentScreenResolution,A(),b(),c.value[0]&&(g.value=Ee.cloneDeep(u.value[Number(c.value[0].id)-1])))}),e.watch(()=>t.switchInStandardMode,(E,B)=>{E!==B&&(a.value=t.switchInStandardMode,r.value=Ee.cloneDeep(i.value))}),e.watch(s,(E,B)=>{E!==B&&A()}),e.onBeforeMount(()=>{h(),C(),k()}),()=>e.createVNode("div",{class:"f-layout-editor-field-list f-utils-fill-flex-column"},[a.value?e.createVNode("div",{class:"f-layout-editor-field-list-standard f-utils-fill-flex-column"},[N(),S()]):e.createVNode("div",{class:"f-layout-editor-field-list-customize f-utils-fill-flex-column"},[N(),S()])])}}),qo=e.defineComponent({name:"FResponseLayoutEditor",props:qw,emits:["close","submit"],setup(t,n){const o=e.ref(t.initialState),a=e.ref(),r=e.ref(),i=e.ref(""),s=e.ref(""),l=e.ref(!1),p=e.ref([{id:"1",label:"区域1"}]),c=e.ref([]),f=e.ref(),u=e.ref(t.width),d=e.ref(t.height);e.watch(()=>t.initialState,D=>{o.value=D}),e.watch([()=>t.currentArea,()=>t.switchInStandardMode],([D,k],[A,$])=>{D!==A&&(p.value=D),k!==$&&(l.value=k)});function m(D){i.value=D}function g(D){s.value=D}function h(D){l.value=D}function y(D){p.value=[].concat(D)}function v(D){a.value=Ee.cloneDeep(D),console.log(a.value)}function b(D){c.value=D}function x(){n.emit("close")}function C(){n.emit("submit",a.value)}function w(){return e.createVNode(cV,{class:"f-utils-fill-flex-column",defaultStates:r.value,originalDataCopy:f.value,currentScreenResolution:s.value,"onUpdate:currentScreenResolution":D=>s.value=D,originalData:a.value,"onUpdate:originalData":D=>a.value=D,switchInStandardMode:l.value,"onUpdate:switchInStandardMode":D=>l.value=D,currentArea:p.value,"onUpdate:currentArea":D=>p.value=D,onCurrentAreaChanged:y,onTwoDimensionalArrayChanged:b,onOriginalDataChanged:v},null)}function V(){return e.createVNode(eV,{class:"f-utils-fill-flex-column",currentArea:p.value,"onUpdate:currentArea":D=>p.value=D,currentScreenResolution:s.value,"onUpdate:currentScreenResolution":D=>s.value=D,switchInStandardMode:l.value,twoDimensionalArray:c.value,"onUpdate:twoDimensionalArray":D=>c.value=D},null)}const N=e.computed(()=>l.value?"f-layout-editor-left-standard f-utils-fill-flex-column":"f-layout-editor-left-customize f-utils-fill-flex-column"),S=e.computed(()=>l.value?"f-layout-editor-right-standard f-utils-fill-flex-column":"f-layout-editor-right-customize f-utils-fill-flex-column");return e.onBeforeMount(()=>{a.value=Ee.cloneDeep(o.value.importData),f.value=Ee.cloneDeep(o.value.importData),r.value=o.value.defaultState,i.value="中等屏幕",s.value="MD"}),D=>e.createVNode("div",{class:"f-layout-editor f-utils-flex-column",style:"height:"+d.value+"px;width:"+u.value+"px;"},[e.createVNode("div",{class:"f-layout-editor-top"},[e.createVNode(Kw,{defaultStates:r.value,onScreenNameChanged:m,onCurrentScreenResolutionChanged:g,onSwitchInStandardModeChanged:h},null)]),e.createVNode("div",{class:"f-layout-editor-content f-utils-fill"},[e.createVNode("div",{class:"f-layout-editor-left f-utils-fill-flex-column"},[e.createVNode("div",{class:N.value},[w()])]),e.createVNode("div",{class:"f-layout-editor-right f-utils-fill-flex-column"},[e.createVNode("div",{class:S.value},[V()])])]),e.createVNode("div",{class:"f-layout-editor-bottom"},[e.createVNode("div",{class:"f-layout-editor-button"},[e.createVNode("div",{class:"f-layout-editor-cancel-btn",onClick:x},[e.createVNode("span",{class:"f-layout-editor-text-cancel"},[e.createTextVNode("取消")])]),e.createVNode("div",{class:"f-layout-editor-sure-btn",onClick:C},[e.createVNode("span",{class:"f-layout-editor-text-sure"},[e.createTextVNode("确认")])])])])])}}),dV=new Map([["appearance",ge]]);function uV(t,n,o,a){const r=t.getSchemaByType("section");return r.id=`${a}-section`,r.appearance={class:"f-section-form f-section-in-main"},r.mainTitle="标题",r.contents=[n],r}function fV(t,n,o,a){const r=t.getSchemaByType("component");return r.id=`${a}-component`,r.componentType="form-col-1",r.appearance={class:"f-struct-form f-struct-wrapper"},r.contents=[n],r}function pV(t,n,o){n.appearance={class:"f-form-layout farris-form farris-form-controls-inline"};const a=uV(t,n,o,n.id);return fV(t,a,o,n.id)}const mV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-editor-setting.schema.json",title:"response-layout-editor-setting",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for response layout editor",type:"string"},type:{description:"The type string of response layout editor component",type:"string",default:"response-layout-editor-setting"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]}},required:["id","type"]},hV={title:"response-form",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},gi={initialState:{type:Object,default:xf},height:{type:Number,default:700},width:{type:Number,default:750},modelValue:{type:Object}},Vf=me(gi,mV,dV,pV,hV),gV=e.defineComponent({name:"FResponseLayoutEditorSettingDesign",props:gi,emits:[],setup(t,n){const o=e.ref(t.initialState),a=e.ref(t.width),r=e.ref(t.height),i=e.ref(),s=e.inject("design-item-context"),l=ye(i,s);e.onMounted(()=>{i.value.componentInstance=l}),n.expose(l.value);function p(){const c=an.show({render:()=>e.createVNode(qo,{initialState:o,width:a,height:r},null),width:900,height:500,buttons:[{class:"btn btn-primary",text:"确定",iconClass:"f-icon f-icon-check",handle:()=>{c.unmount()}},{class:"btn btn-light",text:"取消",iconClass:"f-icon f-icon-close",handle:()=>{c.unmount()}}]})}return()=>e.createVNode("div",{ref:i,class:"f-column-width-setting-button",onClick:p},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),yi=e.defineComponent({name:"FResponseLayoutEditorSetting",props:gi,emits:["change"],setup(t,n){const o=e.ref(t.modelValue),a=e.ref(t.width),r=e.ref(t.height);e.watch(()=>t.modelValue,p=>{o.value=p});function i(p,c){n.emit("change",c),p&&p.unmount()}function s(p){p&&p.unmount()}function l(){if(!o.value.defaultState||!o.value.importData){const p=o.value.message||"只可以在响应式表单组件中调整响应式布局配置";Io.info(p,"");return}an.show({render:p=>e.createVNode(qo,{initialState:o,width:a.value,height:r.value,onClose:()=>s(p),onSubmit:c=>i(p,c)},null),width:900,height:500,showButtons:!1,showHeader:!1,showFloatingClose:!0})}return()=>e.createVNode("div",{class:"f-column-width-setting-button",onClick:l},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),Nf={install(t){t.component(qo.name,qo),t.component(yi.name,yi)},register(t,n,o){t["response-layout-editor-setting"]=yi,n["response-layout-editor-setting"]=Vf},registerDesigner(t,n,o){t["response-layout-editor-setting"]=gV,n["response-layout-editor-setting"]=Vf}},yV=new Map([["appearance",ge]]),bV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/search-box.schema.json",title:"search-box",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a search-box",type:"string"},type:{description:"The type string of search-box component",type:"string",default:"search-box"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function vV(t,n,o){return n}const xV={title:"search-box",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},bi={customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},data:{type:Array,default:[]},onChange:{type:Function,default:()=>{}},onModelValue:{type:Function,default:()=>{}},onSelectedValue:{type:Function,default:()=>{}},placeholder:{type:String,default:"请输入关键词"}},Sf=me(bi,bV,yV,vV,xV),CV={data:{type:Array,default:[]},onConfirmResult:{type:Function,default:()=>{}},onSearchedValue:{type:Function,default:()=>{}}},Tf=e.defineComponent({name:"FSearchBoxContainer",props:CV,emits:["confirmResult","searchedValue"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.computed(()=>({"search-box-container":!0}));function i(l){var p;(p=a.value)==null||p.search(l)}function s(l){l.length&&(n.emit("confirmResult",l[0].name),n.emit("searchedValue",l))}return n.expose({search:i}),()=>e.createVNode("div",{class:r.value},[e.createVNode(e.resolveComponent("f-list-view"),{ref:a,data:o.value,view:"SingleView",onClickItem:l=>s(l.data)},{default:()=>[e.createTextVNode(" ")]})])}}),vi=e.defineComponent({name:"FSearchBox",props:bi,emits:["update:modelValue","change","selectedValue"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.ref(),i=e.ref(t.placeholder),s=e.ref('<i class="f-icon f-icon-search"></i>'),l=e.ref(t.modelValue);e.watch(l,u=>{var d;(d=r.value)==null||d.search(u),n.emit("update:modelValue",u)}),e.watch(()=>t.modelValue,u=>{l.value=u});function p(u){a.value.commitValue(u)}function c(u){n.emit("change",u)}function f(u){n.emit("selectedValue",u)}return()=>e.createVNode("div",null,[e.createVNode(dt,{ref:a,"button-content":s.value,"custom-class":t.customClass,placeholder:i.value,onChange:u=>c(u),"enable-clear":!0,"button-behavior":"Execute",modelValue:l.value,"onUpdate:modelValue":u=>l.value=u,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[e.createVNode(Tf,{ref:r,data:o.value,onConfirmResult:p,onSearchedValue:u=>f(u)},null)]})])}}),wV=e.defineComponent({name:"FSearchBoxDesign",props:bi,emits:["update:modelValue","change"],setup(t,n){const o=e.ref(t.data),a=e.ref(),r=e.ref(),i=e.ref("请输入关键词"),s=e.ref('<i class="f-icon f-icon-search"></i>'),l=e.ref(t.modelValue),p=e.ref(),c=e.inject("design-item-context"),f=ye(p,c);e.onMounted(()=>{p.value.componentInstance=f}),n.expose(f.value),e.watch(l,m=>{var g;(g=r.value)==null||g.search(m),n.emit("update:modelValue",m)}),e.watch(()=>t.modelValue,m=>{l.value=m});function u(m){a.value.commitValue(m)}function d(m){n.emit("change",m)}return()=>e.createVNode("div",{ref:p},[e.createVNode(e.resolveComponent("f-button-edit"),{ref:a,"button-content":s.value,placeholder:i.value,onChange:d,"enable-clear":!0,"button-behavior":"Execute",modelValue:l.value,"onUpdate:modelValue":m=>l.value=m,"popup-host":t.popupHost,"popup-right-boundary":t.popupRightBoundary,"popup-offset-x":t.popupOffsetX,"popup-on-input":!0,"popup-on-focus":!0},{default:()=>[e.createVNode(Tf,{ref:r,data:o.value,onConfirmResult:u},null)]})])}}),Df={install(t){t.component(vi.name,vi)},register(t,n,o){t["search-box"]=vi,n["search-box"]=Sf},registerDesigner(t,n,o){t["search-box"]=wV,n["search-box"]=Sf}};function VV(t,n){const o=e.ref(!1),a=e.ref(!1),r=ln();let i=!0,s=!1,l,p=!1;function c(h){return!(!Rt().basalDragulaRuleForContainer(h)||!i)}function f(){return!p}function u(){return!p}function d(){return s}function m(h){}function g(){o.value=!1,a.value=!1,p=!1,i=!0;const h=t,y=h.appearance&&h.appearance.class||"",v=y?y.split(" "):[],b=h.contents||[],x=b.length?b[0]:null,C=x&&x.appearance&&x.appearance.class||"",w=C?C.split(" "):[],V=b.length?b.reduce((T,E)=>{const B=E&&E.appearance?E.appearance.class:"",I=B?B.split(" "):[];return T.push(...I),T},[]):[],N=n,S=N&&N.appearance&&N.appearance.class||"",D=S?S.split(" "):[];l={componentClass:y,componentClassList:v,childContents:b,firstChildContent:x,firstChildClass:C,firstChildClassList:w,parent:N,parentClass:S,parentClassList:D,children:b,childrenClassList:V};const{canAccept:k,fixed:A,hidePadding:$}=r.getRuleValue(v[0],l);return i=k,s=$,p=A,!0}return{canAccepts:c,checkCanDeleteComponent:f,checkCanMoveComponent:u,hideNestedPaddingInDesginerView:d,onAcceptMovedChildElement:m,resolveComponentContext:g,triggerBelongedComponentToMoveWhenMoved:o,triggerBelongedComponentToDeleteWhenDeleted:a}}const NV=e.defineComponent({name:"FSectionDesign",props:xa,emits:[],setup(t,n){var C;const o=e.ref(),a=e.ref();let r=e.ref();const i=e.inject("design-item-context"),s=VV(i.schema,(C=i.parent)==null?void 0:C.schema),l=ye(o,i,s);l.value.styles="display: inherit;",e.onMounted(()=>{o.value.componentInstance=l}),n.expose(l.value);const p=e.ref(t.customClass),c=e.computed(()=>t.enableAccordion),f=e.ref(t.expandStatus),u=e.computed(()=>t.buttonPosition),d=e.ref(!1),m=Ll(t,n,f,a,r,d),g=Ca(t,n),h=e.computed(()=>{const w={"f-section":!0,"f-section-accordion":c.value==="default","f-state-collapse":(c.value==="default"||c.value==="custom")&&!f.value,"f-section-custom-accordion":c.value==="custom","f-section-fill":t.fill,"f-section-maximize":d.value,"f-utils-fill":!0,"p-0":!0};return p.value&&p.value.split(" ").reduce((V,N)=>(V[N]=!0,V),w),w}),y=e.computed(()=>{const w=t.contentClass.split(" "),V={"f-section-content":!0,"drag-container":!0};return w.reduce((N,S)=>(N[S]=!0,N),V),V}),v=e.computed(()=>{const w=t.extendClass.split(" "),V={"f-section-extend":!0};return w.reduce((N,S)=>(N[S]=!0,N),V),V});function b(){return n.slots.extend&&e.createVNode("div",{class:v.value},[n.slots.extend()])}function x(){return e.createVNode("div",{class:y.value,ref:o,"data-dragref":`${i.schema.id}-container`},[u.value==="inContent"&&g(),n.slots.default&&n.slots.default()])}return()=>e.createVNode("div",{class:h.value,ref:a},[m(),b(),x()])}}),kf={install(t){t.component(Sn.name,Sn)},register(t,n,o){t.section=Sn,n.section=Rl},registerDesigner(t,n,o){t.section=NV,n.section=Rl}},SV=new Map([["appearance",ge]]);function TV(t,n,o){return n}const DV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/smoke-detector.schema.json",title:"smoke-detector",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for smoke-detector",type:"string"},type:{description:"The type string of smoke-detector",type:"string",default:"smoke-detector"},voltageA:{description:"A相电压",type:"number",default:-1},voltageB:{description:"B相电压",type:"number",default:-1},voltageC:{description:"C相电压",type:"number",default:-1},forwardActiveTotalPower:{description:"正向有功总电量",type:"number",default:-1},totalPositiveReactivePower:{description:"正向无功总电量",type:"number",default:-1},reverseTotalActivePower:{description:"反向有功总电量",type:"number",default:-1},reverseTotalReactivePower:{description:"反向无功总电量",type:"number",default:-1},toDeliverData:{description:"下发数据",type:"string"}},required:["id","type"]},kV={title:"smoke-detector",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},bussinessProperties:{description:"",title:"业务属性",properties:{voltageA:{description:"A相电压",type:"number",title:"A相电压",default:-1},voltageB:{description:"B相电压",type:"number",title:"B相电压",default:-1},voltageC:{description:"C相电压",type:"number",title:"C相电压",default:-1},forwardActiveTotalPower:{description:"正向有功总电量",type:"number",title:"正向有功总电量",default:-1},totalPositiveReactivePower:{description:"正向无功总电量",type:"number",title:"正向无功总电量",default:-1},reverseTotalActivePower:{description:"反向有功总电量",type:"number",title:"反向有功总电量",default:-1},reverseTotalReactivePower:{description:"反向无功总电量",type:"number",title:"反向无功总电量",default:-1},toDeliverData:{description:"下发数据",type:"string",title:"下发数据"}}}}},xi={},Af=me(xi,DV,SV,TV,kV),Ci=e.defineComponent({name:"FSmokeDetector",props:xi,emits:[""],setup(t){return()=>e.createVNode("div",{class:"f-smoke-detector"},[e.createVNode("img",{title:"smoke-detector",src:"./image/smoke-detector-2.png"},null)])}}),AV=e.defineComponent({name:"FSmokeDetectorDesign",props:xi,emits:[""],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);return e.onMounted(()=>{o.value.componentInstance=r}),n.expose(r.value),()=>e.createVNode("div",{ref:o,class:"f-smoke-detector"},[e.createVNode("img",{title:"smoke-detector",src:"../image/smoke-detector-2.png"},null)])}}),$f={install(t){t.component(Ci.name,Ci)},register(t,n,o){t["smoke-detector"]=Ci,n["smoke-detector"]=Af},registerDesigner(t,n,o){t["smoke-detector"]=AV,n["smoke-detector"]=Af}},$V=new Map([["appearance",ge]]);function EV(t,n,o){const a=t.getSchemaByType("splitter-pane");return a.appearance={class:"f-col-w6 f-page-content-nav"},a.position="left",n.contents.unshift(a),n}function BV(t,n,o){const a=t.getSchemaByType("splitter-pane");return a.appearance={class:"f-page-content-main"},a.position="main",n.contents.push(a),n}function FV(t,n,o){const a=o.parentComponentInstance;return String(a.schema.appearance.class||"").split(" ").includes("f-page-main")&&(n.appearance={class:"f-page-content"}),EV(t,n),BV(t,n),n}const IV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter.schema.json",title:"splitter",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},direction:{description:"",type:"string",default:"column",enum:["column","row"]}}},MV={title:"splitter",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},wi={direction:{Type:String,default:"column"}},Ef=me(wi,IV,$V,FV,MV);function Bf(t){const n=e.ref(-1),o=e.ref(-1),a=e.ref(0),r=e.ref(0),i=e.ref(!1),s=e.ref(!1),l=e.computed(()=>({display:i.value?"block":"none",left:`${a.value}px`})),p=e.computed(()=>({display:s.value?"block":"none",top:`${r.value}px`})),c=e.computed(()=>({display:s.value||i.value?"block":"none"}));function f(d){const m=t.value;if(m){const{left:g}=m.getBoundingClientRect();a.value=d.clientX-g}}function u(d){const m=t.value;if(m){const{top:g}=m.getBoundingClientRect();r.value=d.clientY-g}}return{horizontalResizeHandleStyle:l,verticalResizeHandleStyle:p,resizeOverlayStyle:c,showHorizontalResizeHandle:i,showVerticalResizeHandle:s,horizontalResizeBarPosition:n,verticalResizeBarPosition:o,verticalResizeHandleOffset:r,horizontalResizeHandleOffset:a,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:u}}const Vi=e.defineComponent({name:"FSplitter",props:wi,emits:[],setup(t,n){const o=e.ref(),a=Bf(o),{horizontalResizeHandleStyle:r,verticalResizeHandleStyle:i,resizeOverlayStyle:s}=a;e.provide("splitter",{useResizeHandleComposition:a});const l=e.computed(()=>({"flex-direction":t.direction==="row"?"column":"row"}));return()=>e.createVNode("div",{class:"f-splitter",ref:o,style:l.value},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-splitter-resize-overlay",style:s.value},null),e.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:r.value},null),e.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:i.value},null)])}}),OV=new Map([["appearance",ge]]),PV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter-pane.schema.json",title:"splitter-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},height:{description:"",type:"number"},position:{description:"",type:"string",default:"",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},width:{description:"",type:"number"},visible:{description:"",type:"number",default:!0}}},_V={title:"splitter-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}},width:{description:"",type:"number",title:"宽度"},height:{description:"",type:"number",title:"高度"}}},appearance:{title:"样式",description:"Appearance",properties:{class:{title:"class",type:"string",description:""},style:{title:"style",type:"string",description:""}}},behavior:{description:"",title:"行为",properties:{collapsable:{description:"",type:"boolean",title:"允许收折"},position:{description:"",type:"enum",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}},resizeable:{description:"",type:"boolean",title:"允许调整尺寸"},visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见",editor:{type:"combo-list",data:[{value:!0,name:"是"},{value:!1,name:"否"}]}}}}}},Ni={customClass:{type:String,defaut:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:200},minHeight:{type:Number,default:200}},Ff=me(Ni,PV,OV,void 0,_V);function If(t,n){const o=e.ref(t.width),a=e.ref(t.height),{horizontalResizeBarPosition:r,horizontalResizeHandleOffset:i,showHorizontalResizeHandle:s,showVerticalResizeHandle:l,verticalResizeBarPosition:p,verticalResizeHandleOffset:c,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:u}=n;let d="",m,g;function h(b){if((d==="left"||d==="right")&&g){const{left:x}=g.getBoundingClientRect(),{width:C}=m.getBoundingClientRect(),w=b.clientX-x,V=d==="left"?(C||0)+(w-r.value):(C||0)-(w-r.value);o.value=t.minWidth>0?Math.max(t.minWidth,V):V}if((d==="top"||d==="bottom")&&g){const{top:x}=g.getBoundingClientRect(),{height:C}=m.getBoundingClientRect(),w=b.clientY-x,V=d==="top"?(C||0)+(w-p.value):(C||0)-(w-p.value);a.value=t.minHeight>0?Math.max(t.minHeight,V):V}i.value=0,c.value=0,r.value=-1,p.value=-1,s.value=!1,l.value=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h),document.body.style.userSelect="",d="",m=null,g=null}function y(b,x,C){if(d=x,m=C,s.value=!0,g=b.composedPath().find(V=>V.className.split(" ")[0]==="f-splitter"),g){const{left:V}=g.getBoundingClientRect();i.value=b.clientX-V,r.value=b.clientX-V,document.addEventListener("mousemove",f),document.addEventListener("mouseup",h),document.body.style.userSelect="none"}}function v(b,x,C){if(d=x,m=C,l.value=!0,g=b.composedPath().find(V=>V.className.split(" ")[0]==="f-splitter"),g){const{top:V}=g.getBoundingClientRect();c.value=b.clientY-V,p.value=b.clientY-V,document.addEventListener("mousemove",u),document.addEventListener("mouseup",h),document.body.style.userSelect="none"}}return{actualWidth:o,actualHeight:a,onClickSplitterHorizontalResizeBar:y,onClickSplitterVerticalResizeBar:v}}const Si=e.defineComponent({name:"FSplitterPane",props:Ni,emits:[],setup(t,n){const o=e.ref(),a=e.inject("splitter"),{useResizeHandleComposition:r}=a,i=If(t,r),{actualHeight:s,actualWidth:l,onClickSplitterHorizontalResizeBar:p,onClickSplitterVerticalResizeBar:c}=i,f=e.ref(t.position),u=e.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-column":f.value==="left"||f.value==="right","f-splitter-pane-row":f.value==="bottom"||f.value==="top","f-splitter-pane-main":f.value==="center"};return t.customClass&&String(t.customClass).split(" ").reduce((y,v)=>(y[v]=!0,y),h),h}),d=e.computed(()=>{const h={};return(l.value&&f.value==="left"||f.value==="right")&&(h.width=`${l.value}px`),(s.value&&f.value==="bottom"||f.value==="top")&&(h.height=`${s.value}px`),h}),m=e.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":f.value==="left","f-splitter-resize-bar-n":f.value==="bottom","f-splitter-resize-bar-s":f.value==="top","f-splitter-resize-bar-w":f.value==="right"}));function g(h,y){(y==="left"||y==="right")&&p(h,y,o.value),(y==="top"||y==="bottom")&&c(h,y,o.value)}return()=>e.createVNode("div",{ref:o,class:u.value,style:d.value},[n.slots.default&&n.slots.default(),e.createVNode("span",{class:m.value,onMousedown:h=>g(h,f.value)},null)])}});function RV(t,n){function o(){return!1}return{canAccepts:o}}const LV=e.defineComponent({name:"FSplitterDesign",props:wi,emits:[],setup(t,n){var u;const o=e.ref(),a=e.inject("design-item-context"),r=RV(a.schema,(u=a.parent)==null?void 0:u.schema),i=ye(o,a,r);i.value.canNested=!1;const s=Bf(o),{horizontalResizeHandleStyle:l,verticalResizeHandleStyle:p,resizeOverlayStyle:c}=s;e.provide("splitter",{useResizeHandleComposition:s});const f=e.computed(()=>({"flex-direction":t.direction==="row"?"column":"row"}));return e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value),()=>e.createVNode("div",{class:"f-splitter",ref:o,style:f.value},[n.slots.default&&n.slots.default(),e.createVNode("div",{class:"f-splitter-resize-overlay",style:c.value},null),e.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:l.value},null),e.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:p.value},null)])}});function HV(t,n){function o(r){var p;if(!Rt().basalDragulaRuleForContainer(r))return!1;if(((((p=t.appearance)==null?void 0:p.class)||"").split(" ")||[]).includes("f-page-content-nav")){const c=t.contents&&t.contents[0];return!(c&&c.type==="component")}return!0}function a(r,i,s){const l=t,c=(l.appearance&&l.appearance.class||"").split(" ");if(l.position==="main"&&c.includes("f-page-content-main")){if(s.type==="tabs"){const f=s.appearance&&s.appearance.class?String(s.appearance.class).split(" "):[];f.unshift("f-tabs-in-card"),s.appearance={class:f.join(" ")};const u=lt("section");u.id=`${s.id}-section`,u.appearance={class:"f-section-tabs f-section-in-mainsubcard"},u.contents=[s];const d=lt("content-container");return d.id=`${s.id}-struct-wrapper`,d.appearance={class:"f-struct-wrapper"},d.contents=[u],d}if(s.type==="section"){const f=s.appearance&&s.appearance.class?String(s.appearance.class).split(" "):[];f.unshift("f-section-in-main"),s.appearance={class:f.join(" ")},s.title=String(r.innerText);const u=lt("content-container");return u.id=`${s.id}-struct-wrapper`,u.appearance={class:"f-struct-wrapper"},u.contents=[s],u}}return s}return{canAccepts:o,onAcceptNewChildElement:a}}const jV=e.defineComponent({name:"FSplitterPaneDesign",props:Ni,emits:[],setup(t,n){var g;const o=e.ref(),a=e.inject("design-item-context"),r=HV(a.schema,(g=a.parent)==null?void 0:g.schema),i=ye(o,a,r);i.value.styles="padding:0;box-shadow:none;",i.value.canNested=!1,i.value.canMove=!1,i.value.canDelete=!1,e.onMounted(()=>{o.value.componentInstance=i}),n.expose(i.value);const s=e.inject("splitter"),{useResizeHandleComposition:l}=s,p=If(t,l),{actualHeight:c,actualWidth:f}=p,u=e.ref(t.position),d=e.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-column":u.value==="left"||u.value==="right","f-splitter-pane-row":u.value==="bottom"||u.value==="top","f-splitter-pane-main":u.value==="center","f-component-splitter-pane":!0,"drag-container":!0};return t.customClass&&String(t.customClass).split(" ").reduce((y,v)=>(y[v]=!0,y),h),h}),m=e.computed(()=>{const h={};return(f.value&&u.value==="left"||u.value==="right")&&(h.width=`${f.value}px`),(c.value&&u.value==="bottom"||u.value==="top")&&(h.height=`${c.value}px`),h});return()=>e.createVNode("div",{ref:o,"data-dragref":`${a.schema.id}-container`,class:d.value,style:m.value},[n.slots.default&&n.slots.default()])}}),Mf={install(t){t.component(Vi.name,Vi),t.component(Si.name,Si)},register(t,n,o){t.splitter=Vi,n.splitter=Ef,t["splitter-pane"]=Si,n["splitter-pane"]=Ff},registerDesigner(t,n,o){t.splitter=LV,n.splitter=Ef,t["splitter-pane"]=jV,n["splitter-pane"]=Ff}},WV=new Map([["appearance",ge]]);function qV(t,n,o){return n}const zV={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},GV={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Ti={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},Of=me(Ti,zV,WV,qV,GV),Di=e.defineComponent({name:"FStep",props:Ti,emits:["click"],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),r=e.ref(t.height),i=e.ref(t.steps),s=e.ref(t.clickable),l=e.ref(0),p=e.ref(t.activeIndex),c=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),f=e.computed(()=>({height:o.value==="vertical"?`${r.value}px`:""}));function u(V,N){const S={step:!0,active:N===p.value,clickable:s.value,current:N===p.value};return N<p.value&&(S.finish=!0),S}function d(V,N){const S={step:V,stepIndex:N};n.emit("click",S)}function m(V,N){const S={"f-progressstep-row":!0,"step-active":N===p.value,"step-current":N===p.value};return N<p.value&&(S["step-finish"]=!0),S}function g(V,N){return{"step-icon":!0,"step-success":N,"f-icon":N,"f-icon-check":N}}function h(V,N){const S=[];return N>=p.value||N===l.value?S.push(e.createVNode("span",{class:"step-icon"},[N+1])):S.push(e.createVNode("span",{class:g(V,!0)},null)),S}function y(V,N){return{"step-name":!0,"step-name-success":N<p.value}}function v(V,N){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:y(V,N)},[V.title])])}function b(V,N){return{"f-progress-step-line":!0,"f-progress-step-line-success":N===p.value}}function x(V,N){return N!==i.value.length-1}const C=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function w(){return i.value.map((V,N)=>e.createVNode("li",{class:u(V,N),onClick:S=>d(V,N)},[e.createVNode("div",{class:m(V,N)},[e.createVNode("div",{class:"f-progress-step-content"},[h(V,N),v(V,N)]),x(V,N)&&e.createVNode("div",{class:b(V,N)},[e.createVNode("span",{class:C.value},null)])])]))}return e.watch(()=>t.activeIndex,()=>{t.activeIndex>-1&&t.activeIndex<=i.value.length&&(p.value=t.activeIndex,w())}),()=>e.createVNode("div",{class:"f-progress-step"},[e.createVNode("ul",{class:c.value,style:f.value},[w()])])}}),UV=e.defineComponent({name:"FStepDesign",props:Ti,emits:[],setup(t,n){const o=e.ref(t.direction),a=e.ref(t.fill),r=e.ref(t.height),i=e.ref(t.steps),s=e.ref(0),l=e.ref(t.clickable),p=e.ref(0),c=e.ref(),f=e.inject("design-item-context"),u=ye(c,f);e.onMounted(()=>{c.value.componentInstance=u}),n.expose(u.value);const d=e.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),m=e.computed(()=>({height:o.value==="vertical"?`${r.value}px`:""}));function g(D,k){const A={step:!0,active:k===s.value,clickable:l.value,"click-disable":D.disable,current:k===s.value};return k<s.value&&(A.finish=!0),D.status&&(A[D.status]=!0),D.hasOwnProperty("class")&&D.class.split(" ").reduce(($,T)=>($[T]=!0,$),A),A}function h(D,k){}function y(D,k){const A={"f-progressstep-row":!0,"step-active":k===s.value,"step-current":k===s.value};return k<s.value&&(A["step-finish"]=!0),D.status&&(A["step-"+D.status]=!0),A}function v(D,k){const A={"step-icon":!0,"step-success":k,"k-icon":k,"k-i-check":k};return D.hasOwnProperty("icon")&&D.class.split(" ").reduce(($,T)=>($[T]=!0,$),A),A}function b(D,k){const A=[];return D.icon?A.push(e.createVNode("span",{class:v(D,!1)},null)):k>=s.value||k===p.value?A.push(e.createVNode("span",{class:"step-icon"},[k+1])):A.push(e.createVNode("span",{class:v(D,!0)},null)),A}function x(D,k){return{"step-name":!0,"step-name-success":k<s.value}}function C(D,k){return e.createVNode("div",{class:"f-progress-step-title"},[e.createVNode("p",{class:x(D,k)},[D.title])])}function w(D,k){return{"f-progress-step-line":!0,"f-progress-step-line-success":k===s.value}}function V(D,k){return k!==i.value.length-1}const N=e.computed(()=>({triangle:!0,"":o.value==="vertical"}));function S(){return i.value.map((D,k)=>e.createVNode("li",{class:g(D,k),onClick:A=>void 0},[e.createVNode("div",{class:y(D,k)},[e.createVNode("div",{class:"f-progress-step-content"},[b(D,k),C(D,k)]),V(D,k)&&e.createVNode("div",{class:w(D,k)},[e.createVNode("span",{class:N.value},null)])])]))}return()=>e.createVNode("div",{ref:c,class:"f-progress-step"},[e.createVNode("ul",{class:d.value,style:m.value},[S()])])}}),Pf={install(t){t.component(Di.name,Di)},register(t,n,o){t.step=Di,n.step=Of},registerDesigner(t,n,o){t.step=UV,n.step=Of}},YV=e.defineComponent({name:"FSwitchDesign",props:mi,emits:["update:modelValue"],setup(t,n){const{disable:o,size:a,onLabel:r,offLabel:i}=e.toRefs(t),s=e.ref(t.modelValue),l=e.ref(),p=e.inject("design-item-context"),c=ye(l,p);e.onMounted(()=>{l.value.componentInstance=c}),n.expose(c.value);function f(){return""}function u(){return""}function d(){return""}const m=e.computed(()=>({switch:!0,"f-cmp-switch":!0,checked:s.value,disabled:o.value,"switch-large":a.value==="large","switch-medium":a.value==="medium","switch-small":a.value==="small"})),g=e.computed(()=>({outline:"none","backgroud-color":f(),"border-color":u()})),h=e.computed(()=>({background:d()})),y=e.computed(()=>(r==null?void 0:r.value)||(i==null?void 0:i.value));function v(x,C=!0){o.value||(s.value=!s.value,n.emit("update:modelValue",s.value))}function b(x){v()}return()=>e.createVNode("span",{ref:l,tabindex:"0",role:"button",class:m.value,style:g.value,onClick:b},[y.value&&e.createVNode("span",{class:"switch-pane"},[e.createVNode("span",{class:"switch-label-checked"},[r==null?void 0:r.value]),e.createVNode("span",{class:"switch-label-unchecked"},[i==null?void 0:i.value])]),e.createVNode("small",{style:h.value},[n.slots.default&&n.slots.default()])])}}),_f={install(t){t.component(jo.name,jo)},register(t,n,o){t.switch=jo,n.switch=Cf},registerDesigner(t,n,o){t.switch=YV,n.switch=Cf}};function ZV(t,n,o,a,r){const{activeId:i,removeTab:s,selectTab:l,removeDesignTab:p,selectDesignTab:c}=r,f=e.computed(()=>({"st-tab-text":!0,"farris-title-auto":t.autoTitleWidth})),u=e.computed(()=>{const S={"farris-component":!0,"nav-item":!0,"d-none":n.show!==void 0?!n.show:!1,"f-state-active":n.id===i.value,"f-state-disable":n.disabled};return S[`${n.id}-design-item`]=!0,S}),d=e.computed(()=>({width:`${n.tabWidth}px`})),m=e.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:n.id===i.value,disabled:n.disabled}));function g(S){return e.createVNode("span",{class:f.value,title:S.title},[S.title])}function h(S){return S.slots.title?S.slots.title:g}const y=h(o),v=e.ref(n.removeable);function b(){return e.createVNode("span",{class:"st-drop-close",onClick:S=>s(S,n.id)},[e.createVNode("i",{class:"f-icon f-icon-close"},null)])}function x(S){l(n.id),t.tabType==="one-page"&&a.scrollToByPaggId(n.id)}function C(S){c(S,n.id)}function w(S){Io.question(`确定删除标签页【${o.props.title}】?`,"",()=>p(S,n.id),()=>{})}function V(){return e.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:S=>w(S)},[e.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function N(){return e.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[e.createVNode("div",null,[V()])])}return e.createVNode("li",{onClick:S=>C(S),class:u.value,style:d.value,id:`${n.id}-design-item`},[N(),e.createVNode("a",{class:m.value,onClick:x},[y(n),v.value&&b()])])}function KV(t,n,o,a,r,i,s){const{shouldShowNavigationButtons:l}=o,{tabPages:p}=r,c=e.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":l.value})),f=e.computed(()=>({width:"100%","justify-content":t.justifyContent})),u=e.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":t.fill||t.tabType==="fill","nav-pills":t.tabType==="pills","flex-row":t.position==="top"||t.position==="bottom","flex-column":t.position==="left"||t.position==="right"})),d=e.computed(()=>({overflow:"auto"}));function m(h){const{componentType:y}=h;let v=lt(y,h);s&&s.onResolveNewComponentSchema&&(v=s.onResolveNewComponentSchema(h,v));const b=y.toLowerCase().replace("-","_");return v&&!v.id&&v.type===y&&(v.id=`${b}_${Math.random().toString().slice(2,6)}`),v}const g=function(h){var x;const y={componentType:"tab-page",label:"Tab1",parentComponentInstance:i.value,targetPosition:-1},v=m(y);(x=i.value.schema.contents)==null||x.push(v);const{selectTabByTabId:b}=r;b(v.id)};return()=>e.createVNode("div",{class:c.value,style:f.value},[e.createVNode("ul",{class:u.value,style:d.value,ref:n},[p.value.map(h=>ZV(t,h.props,h,a,r)),e.createVNode("li",{class:"nav-item"},[e.createVNode("a",{class:"nav-link tabs-text-truncate",title:"添加页签",onClick:h=>g()},[e.createVNode("i",{class:"f-icon f-icon-plus",style:"font-size: 20px;margin: 0 auto;line-height: 24px;"},null)])])])])}function QV(t,n){const o=ln();let a=!1,r,i=!1;function s(u){return!1}function l(){return!i}function p(){return!i}function c(){return a}function f(){const u=t,d=u.appearance&&u.appearance.class||"",m=d?d.split(" "):[],g=n==null?void 0:n.schema,h=g&&g.appearance&&g.appearance.class||"",y=h?h.split(" "):[],v=u.contents||[],b=v.length?v[0]:null,x=b&&b.appearance&&b.appearance.class||"",C=x?x.split(" "):[],w=v.length?v.reduce((A,$)=>{const T=$&&$.appearance?$.appearance.class:"",E=T?T.split(" "):[];return A.push(...E),A},[]):[],V=(n==null?void 0:n.parent)&&n.parent.schema,N=V&&V.appearance&&V.appearance.class||"";N&&N.split(" "),r={componentClass:d,componentClassList:m,childContents:v,firstChildContent:b,firstChildClass:x,firstChildClassList:C,parent,parentClass:h,parentClassList:y,children:v,childrenClassList:w};const{canAccept:S,fixed:D,hidePadding:k}=o.getRuleValue(m[0],r);return a=k,i=D,!0}return{canAccepts:s,checkCanDeleteComponent:l,checkCanMoveComponent:p,hideNestedPaddingInDesginerView:c,resolveComponentContext:f}}function XV(t,n,o,a){const r=e.ref([]),i=e.ref(t.activeId||""),s=e.ref(!0),l=e.ref(),p=e.ref([]);function c(T){const E=T.value.findIndex(B=>B.props.show!==!1&&!i.value&&!B.props.disabled);!i.value&&E!==-1&&(i.value=T.value[E].props.id)}function f(T,E){T.classList.contains(E)||T.classList.add(E)}function u(T,E){T.classList.remove(E)}function d(T){const{parentElement:E}=T;E&&(T.scrollWidth>E.offsetWidth?f(T,"farris-title-text-custom"):u(T,"farris-title-text-custom"))}function m(T){var B;if(t.autoTitleWidth)return;const E=(B=T.value)==null?void 0:B.querySelectorAll(".st-tab-text");E&&E.forEach(I=>d(I))}const g=T=>{T.preventDefault(),T.stopPropagation()};function h(T){r.value=r.value.filter(E=>E.props.id!==T),i.value===T&&(i.value="",c(r))}function y(T,E,B=!1){const I=r.value.findIndex(F=>F.props.id===E);h(E),g(T),e.nextTick(()=>{m(o),B&&(s.value=!0),n.emit("tabRemove",{removeIndex:I,removeId:E,activeId:i.value})})}function v(){const T=r.value.find(I=>I.props.id===i.value);p.value=[],T&&T.props.toolbar&&T.props.toolbar.buttons&&T.props.toolbar.buttons.length&&(p.value=[...T.props.toolbar.buttons]);const E=a.schema.contents,B=E==null?void 0:E.find(I=>I.id===i.value);l.value=B==null?void 0:B.toolbar}function b(T){const E=i.value;i.value=T,v(),n.emit("tabChange",{prevId:E,nextId:i.value})}function x(T){b(T)}function C(T){r.value.findIndex(B=>B.props.id===T.props.id)===-1&&r.value.push(T)}function w(T){r.value.findIndex(B=>B.props.id===T.props.id)!==-1&&(r.value.forEach(B=>{B.props.id===T.props.id&&(B=T)}),e.nextTick(()=>{m(o)}))}function V(T){T&&(T.stopPropagation(),T.preventDefault())}function N(T,E){V(T);const B=a.schema.contents,I=B==null?void 0:B.findIndex(F=>F.id===E);I===-1||I===void 0||(B==null||B.splice(I,1),h(E))}function S(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(E=>E.classList.remove("dgComponentFocused"));const T=document.getElementsByClassName("dgComponentSelected");Array.from(T).forEach(E=>E.classList.remove("dgComponentSelected"))}function D(T){T.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function k(T){var F;const{contents:E=[]}=a.schema,B=E==null?void 0:E.findIndex(R=>R.id===T),I=E[B];(F=a==null?void 0:a.setupContext)==null||F.emit("selectionChange",I.type,I)}function A(T,E){S(),V(T),D(T),k(E)}function $(T,E){S(),V(T),D(T)}return{activeId:i,addTab:C,changeTitleStyle:m,removeTab:y,selectTab:x,selectTabByTabId:b,tabPages:r,updateTab:w,toolbarItems:p,removeDesignTab:N,selectDesignTab:A,selectDesignTabToolbar:$,toolbarSchema:l}}function JV(t,n,o,a){const{toolbarItems:r,toolbarSchema:i}=t,s=p=>{};function l(p,c){var f;(f=a.setupContext)==null||f.emit("selectionChange",p,c)}return e.createVNode("div",{class:"farris-tabs-toolbar"},[e.createVNode("div",{class:"farris-tabs-inline-flex"},[e.createVNode(Gu,{modelValue:i.value,"onUpdate:modelValue":p=>i.value=p,canAdd:!0,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",onSelectionChange:l},{default:()=>[e.createVNode(ei,{items:r.value,onClick:s},null)]})])])}const eN=e.defineComponent({name:"FTabsDesign",props:ma,emits:["tabChange","tabRemove"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=QV(a.schema,a.parent),i=ye(o,a,r),s=e.ref(t.tabType),l=e.shallowRef(),p=e.shallowRef(),c=XV(t,n,l,a),{activeId:f,changeTitleStyle:u,tabPages:d,addTab:m,updateTab:g,selectTabByTabId:h,toolbarItems:y}=c,v=Bl(t,p,c),b=$l(t,l,v,c),{previousButtonClass:x,nextButtonClass:C,nextButtonGroupClass:w,scrollTab:V,updateNavigationLayout:N}=b,S=El(t,c),{hideDropDown:D}=S,k=KV(t,l,b,v,c,i,r),A=k,$=kl(t,l,b,v,c),T=new Map([["default",k],["one-page",A],["pills",$]]);e.computed(()=>{const j=d.value.find(Z=>Z.props.id===f.value);return j==null?void 0:j.slots});const E=e.computed(()=>{const j=d.value.find(U=>U.props.id===f.value);return(j==null?void 0:j.props.toolbarPosition)==="inHead"});e.provide("tabs",{activeId:f,addTab:m,updateTab:g,tabPages:d,tabType:s});function B(){const j=i.value.schema.contents||[];return j.length<1?null:j.find(U=>U.id===f.value)}function I(){var Z;const j=B();y.value=[...(Z=j==null?void 0:j.toolbar)==null?void 0:Z.buttons]}e.provide("toolbar-item-handler",I);const F=e.computed(()=>t.fill||t.tabType==="fill"),R=e.computed(()=>t.tabType==="pills"),O=e.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":E.value,"farris-tabs-inContent":!E.value,"farris-tabs-nav-fill":F.value,"farris-tabs-nav-pills":R.value})),W=e.computed(()=>({width:E.value&&t.titleWidth?`${t.titleWidth}%`:""})),M=e.computed(()=>({"farris-tabs":!0,"flex-column":t.position==="top","flex-column-reverse":t.position==="bottom","flex-row":t.position==="left","flex-row-reverse":t.position==="right","one-page":t.tabType==="one-page"}));e.onMounted(()=>{d.value.length&&(f.value=t.activeId||d.value[0].props.id,h(f.value)),e.nextTick(()=>{N()}),u(l),window.addEventListener("click",j=>{var Z;D.value||(Z=o.value)!=null&&Z.contains(j.target)||(D.value=!0)}),window.addEventListener("resize",()=>{N()}),o.value.componentInstance=i});function _(){return e.createVNode("button",{title:"left-arrow-button",type:"button",class:x.value,onClick:()=>{V(0,-1)}},null)}function H(){return e.createVNode("button",{title:"right-arrow-button",type:"button",class:C.value,onClick:()=>{V(0,1)}},null)}const{renderMorePagesButtton:L}=Al(t,S,b,c);function G(){return!!y.value.length&&JV(c,i,r,a)}const Y=T.get(t.tabType)||T.get("default");function z(){var j,Z,U,X;return e.createVNode("div",{class:O.value},[e.createVNode("div",{class:"farris-tabs-header-pre"},[(Z=(j=n.slots).headerPrefix)==null?void 0:Z.call(j)]),e.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:W.value},[_(),Y&&Y(),e.createVNode("div",{class:w.value},[H(),L()])]),G(),e.createVNode("div",{class:"farris-tabs-header-post"},[(X=(U=n.slots).headerSuffix)==null?void 0:X.call(U)])])}function q(){var j,Z;return e.createVNode("div",{class:"farris-tabs-content",ref:p},[(Z=(j=n.slots).default)==null?void 0:Z.call(j)])}return n.expose(i.value),()=>e.createVNode("div",{class:M.value,ref:o},[z(),q()])}});function tN(t,n){function o(r){return!!Rt().basalDragulaRuleForContainer(r)}function a(r){}return{canAccepts:o,onAcceptMovedChildElement:a}}function nN(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const oN=e.defineComponent({name:"FTabPageDesign",props:va,emits:[],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=tN(a.schema,a.parent),i=ye(o,a,r);i.value.canNested=!1,i.value.canDelete=!1,i.value.canMove=!1,n.expose(i.value);const s=e.inject("tabs"),l=e.ref(!0),p={slots:n.slots,props:t},c=e.ref((s==null?void 0:s.tabType.value)||"default");e.onMounted(()=>{o.value.componentInstance=i;const v=s.tabPages.value.findIndex(b=>b.props.id===t.id);!v||v===-1?s==null||s.addTab(p):v>-1&&(l.value=!1,console.warn(`已经存在id为${t.id}的页签啦`))}),e.onUnmounted(()=>{});const f=e.computed(()=>(t==null?void 0:t.id)===(s==null?void 0:s.activeId.value)),u=e.computed(()=>({display:f.value?"":"none"}));e.watch(()=>t,v=>{s==null||s.updateTab({props:v,slots:n.slots})},{immediate:!0,deep:!0});function d(){var b,x;const v=(x=(b=n.slots).default)==null?void 0:x.call(b);return e.createVNode(Sn,{"main-title":t.title,class:"farris-tab-page"},nN(v)?v:{default:()=>[v]})}const m=e.computed(()=>({"farris-tab-page":!0,"drag-container":!0}));function g(){var b,x;const v=(x=(b=n.slots).default)==null?void 0:x.call(b);return e.createVNode("div",{ref:o,class:m.value,"data-dragref":`${a.schema.id}-container`,style:u.value},[v])}const y=new Map([["default",g],["one-page",d]]).get(c.value)||g;return()=>l.value?y():null}}),Rf={install(t){t.component(eo.name,eo),t.component(sn.name,sn)},register(t,n,o){t.tabs=eo,t["tab-page"]=sn,n.tabs=Sl,n["tab-page"]=_l},registerDesigner(t,n,o){t.tabs=eN,t["tab-page"]=oN,n.tabs=Sl,n["tab-page"]=_l}},aN=e.defineComponent({name:"FTagsDesign",props:Ha,emits:["remove","selectionChange","change"],setup(t,n){const o=e.ref(t.selectable),a=e.ref(t.customClass),r=e.ref(t.data),i=e.ref(t.tagType),s=e.ref(t.tagStyle),l=e.ref(t.showColor),p=e.ref(t.activeTag),c=e.ref(t.customStyle),f=e.ref(t.showClose),u=e.ref(t.showAddButton),d=e.ref(t.showInput),m=e.ref(t.addButtonText),g=e.ref(t.enableAddButton);e.ref(t.placeholder),e.ref(""),e.ref();const h=e.ref(),y=e.ref(t.wrapText),v=e.ref(),b=e.ref(),x=e.inject("design-item-context"),C=ye(b,x);e.onMounted(()=>{b.value.componentInstance=C}),n.expose(C.value);function w(){const ee=r.value.map(K=>({type:"Tag",payload:K}));return u.value&&ee.push({type:"AddButton"}),ee}const V=e.ref(w());function N(ee){r.value=ee,V.value=w()}const S=e.computed(()=>V.value.findIndex(ee=>ee.type==="Input")),D=$c(t,n,r,V),{dragstart:k,dragenter:A,dragover:$,dragend:T}=D;e.watch(()=>t.data,ee=>N(ee));const E=e.computed(()=>{const ee={"farris-tags":!0,"farris-tags-checkable":o.value,"farris-tags-nowrap":!y.value};return a.value.split(" ").reduce((K,se)=>(K[se]=!0,K),ee),ee});function B(ee){const K={"farris-tag-item":!0,"farris-tag-item-checked":o.value&&ee.checked,"farris-tag-item-checkable":o.value,"farris-tag-item-has-color":l.value,"farris-tag-item-actived":p.value===ee.name};if(i.value){const se=`farris-tag-item-${i.value}`;K[se]=!0}return K}const I=e.computed(()=>{const ee={};return c.value&&c.value.split(";").reduce((K,se)=>{const ue=se.split(":");return K[ue[0]]=ue[1],K},ee),ee});function F(ee,K){o.value&&K.selectable&&(K.checked=!K.checked,p.value=K.checked?K.name:"",K.checked&&r.value.filter(se=>se.name!==K.name).forEach(se=>{se.checked=!K.checked}),n.emit("change",r.value),n.emit("selectionChange",K))}function R(ee,K){let se;switch(ee.key){case"Backspace":r.value=r.value.filter(ue=>ue.name!==K.name),n.emit("change",r.value);break;case"ArrowLeft":se=Math.max(h.value.scrollLeft+20,0),h.value.scrollLeft=se;break;case"ArrowRight":se=Math.max(h.value.scrollLeft-20,0),h.value.scrollLeft=se}}function O(ee,K){const se=r.value.findIndex(ue=>ue.name===K.name);if(se>-1){const[ue]=r.value.splice(se,1);V.value=w(),n.emit("change",r.value),n.emit("remove",r.value,ue,se)}ee.stopPropagation()}const W=e.computed(()=>({"farris-tag-item":!0,"farris-tag-add-button":!0,"farris-tag-add-button-disabled":!g.value}));function M(ee){}function _(){return e.createVNode("li",{class:W.value,onClick:ee=>void 0},[e.createVNode("span",{class:"f-icon f-icon-amplification"},null),e.createVNode("span",{class:"farris-tag-add-text"},[m.value])])}function H(ee){if(ee&&!ee.innerText){const K=S.value;if(K>0){const[se]=r.value.splice(K-1,1);V.value.splice(K-1,1),n.emit("remove",r.value,se,K-1)}}}function L(ee,K,se){ee>-1&&(r.value.splice(ee,0,{name:K,value:se,selectable:o.value}),V.value=w(),n.emit("change",r.value))}function G(ee){if(ee&&ee.innerText){const K=ee.innerText,se=S.value;L(se,K,K),ee.innerText=""}}function Y(ee){const K=ee.target;K&&(K.innerText?G(K):n.emit("change",r.value))}function z(ee){ee.key==="Enter"&&G(ee.target),ee.key==="Backspace"&&(H(ee.target),e.nextTick(()=>{v.value&&v.value.focus()}))}function q(){return e.createVNode("li",{class:"farris-tag-input-box"},[e.createVNode("div",{ref:v,class:"form-control",contenteditable:"true",onKeyup:z,onBlur:Y},null)])}function j(ee,K){return e.createVNode("li",{class:B(ee),style:I.value,tabindex:0,id:ee.name,key:ee.name,onClick:se=>F(se,ee),onKeydown:se=>R(se,ee),draggable:"true",onDragstart:se=>k(se,ee,K),onDragenter:se=>A(se,K),onDragend:se=>T(se,ee),onDragover:se=>$(se,K)},[e.createVNode("div",{title:ee.name,class:"tag-box"},[ee.name]),f.value&&e.createVNode("span",{class:"tag-delete"},[e.createVNode("i",{class:"f-icon f-icon-close",onClick:se=>O(se,ee)},null)])])}function Z(){return V.value.map((ee,K)=>{switch(ee.type){case"Tag":return j(ee.payload,K);case"AddButton":return _();case"Input":return q()}})}const U=e.computed(()=>({"farris-tags-item-container":!0,"farris-tag-item-capsule":s.value==="capsule"}));function X(ee){const K=Math.max(h.value.scrollLeft-ee.deltaX,0);h.value.scrollLeft=K}function ie(ee){const K=h.value,se=r.value.length-1;if(K){const ue=Array.from(K.children).filter(Te=>Te.className.indexOf("farris-tag-item")>-1).findIndex(Te=>{const ke=Te.getBoundingClientRect(),_e=window.getComputedStyle(Te),te=parseInt(_e["margin-left"],10)+ke.width+parseInt(_e["margin-right"],10);return ke.left+te>ee});if(ue>-1)return ue}return se}function de(ee){if(d.value){const se=ie(ee.clientX)+1,Te=V.value.filter(ke=>ke.type!=="Input");Te.splice(se,0,{type:"Input"}),V.value=Te,e.nextTick(()=>{v.value&&v.value.focus()})}}function ne(ee){var se;ee.preventDefault(),ee.stopPropagation();const K=(se=ee.dataTransfer)==null?void 0:se.getData("Text");if(K){const ue=K.split(":"),Te=ue[0],ke=ue[1];[...r.value].findIndex(ce=>(console.log(`${ce.value} === ${ke} is ${ce.value===ke}`),ce.value===ke))>-1||L(r.value.length,Te,ke)}}function oe(ee){ee.preventDefault()}return()=>e.createVNode("div",{ref:b,class:E.value,onClick:de,onDrop:ne,onDragover:oe},[e.createVNode("ul",{ref:h,class:U.value,onWheel:ee=>X(ee)},[Z()])])}}),Lf={install(t){t.component(so.name,so)},register(t,n,o){t.tags=so,n.tags=Ac},registerDesigner(t,n,o){t.tags=aN,n.tags=Ac}},rN=new Map([["appearance",ge]]);function iN(t,n,o){return n}const sN={title:"text",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},lN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/text.schema.json",title:"text",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for text",type:"string"},type:{description:"The type string of text",type:"string",default:"text"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},ki={modelValue:{type:[String,Number,Boolean],default:""},password:{type:Boolean,default:!1},textarea:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1},dateRange:{type:Boolean,default:!1},maxHeight:{type:Number,default:0},height:{type:Number,default:0},type:{type:String,default:"string"},format:{type:String,default:""},enumConvertedDatas:{default:void 0},groupSeparator:{type:String,default:","},decimalSeparator:{type:String,default:"."},decimalFilledSymbol:{type:String,default:"0"},numberOptions:{type:Object,default:void 0},amountExpression:{type:String,default:"%s%v"},textField:{type:String,default:"name"},valueField:{type:String,default:"value"},textAlign:{type:String,default:""},dateRangeDelimiter:{type:String,default:"~"},enumDelimiter:{type:String,default:","}},Hf=me(ki,lN,rN,iN,sN);function cN(t){let n;return/Y/g.test(t)===!0?n=t.replace(/Y/g,"y"):n=t,/D/g.test(n)===!0&&(n=n.replace(/D/g,"d")),n}function dN(t,n,o,a,r){if(t==null||t==="")return"";if(n&&n.length){const i=(""+t).split(o),s=[];for(let l=0;l<i.length;l++){const p=n.find(c=>c[r]===i[l]);p?s.push(p[a]):s.push(i[l])}return s.length>0?s.join(o):""}return t}function jf(t,n){let o;return n||(n="YYYY-MM-DD"),n==="timeago"?Gy().formatTo(t):(n==="hh:mm:ss"||n==="HH:mm:ss"?o=t:o=_a().formatTo(t,cN(n)),o)}function uN(t,n){return!t&&!n||n&&n.type&&n.type==="number"&&(n.formatter||(n.useThousands?n.precision!==void 0?t="n"+n.precision:t="n2":n.precision!==void 0?t="f"+n.precision:t="f2")),t}function fN(t){return t.replace(/[a-z]+/g,n=>n.toUpperCase())}function pN(t,n,o){return t.toString().indexOf(".")>-1?(console.warn("十进制转换仅限整型类型"),""):(Array(n).join(o)+t).slice(-n)}function mN(t,n){return Number(t*100).toFixed(Number(n))+"%"}function hN(t,n,o,a,r,i,s){if(!n&&!o)return t.toString();if(o&&o.type&&o.type==="number"&&o.formatter)return o.formatter(t);const l=fN(n.substring(0,1)),p=Number(n.substring(1)),c={};let f;if(!/C|D|F|N|P/g.test(l)){console.log(`不支持format为 ${n} 类型的数字格式化`);return}a&&Object.assign(c,{groupSeparator:a}),r&&Object.assign(c,{decimalSeparator:r}),i&&Object.assign(c,{format:i});const{formatTo:u}=qy();switch(l){case"C":Object.assign(c,{prefix:"¥",precision:p}),f=u(t,c);break;case"D":f=pN(t,p,s);break;case"F":Object.assign(c,{prefix:"",groupSeparator:"",precision:p}),f=u(t,c);break;case"N":Object.assign(c,{prefix:"",precision:p}),f=u(t,c);break;case"P":f=mN(t,p);break}return f}function gN(t){return t===!0?"是":t===!1||t==null||t===""||typeof t>"u"?"否":t}const Ai=e.defineComponent({name:"FText",props:ki,emits:["update:modelValue","valueChange"],setup(t,n){const o=e.ref(t.textarea),a=e.ref(t.password),r=e.ref(t.autoSize),i=e.ref(t.dateRange),s=e.ref(t.type),l=e.ref(t.format),p=e.ref(),c=e.ref(),f=e.ref(""),u=e.computed(()=>({"f-form-control-text":!o.value,"f-form-context-textarea":o,"f-component-text-auto-size":r.value})),d=e.computed(()=>({"text-align":t.textAlign,height:!r.value&&t.height>0?`${t.height}px`:"","min-height":r.value&&t.height>0?`${t.height}px`:"","max-height":r.value&&t.maxHeight>0?`${t.maxHeight}px`:""}));e.onMounted(()=>{if(o.value){const y=c.value.parentElement.className;c.value.parentElement.className=y+" f-cmp-text-is-textarea"}});const m=e.computed(()=>{let y=g(t.modelValue);return p.value!=y&&(n.emit("valueChange",y),p.value=y),y});function g(y){if(a.value)return y?"******":"";if(s.value!=="boolean"&&(y==null||typeof y>"u"))return"";let v="";switch(s.value){case"string":v=y;break;case"date":case"datetime":if(!i.value)v=jf(y,l.value);else{let b=t.dateRangeDelimiter;const x=y.split(b);let C=[];x&&x.length&&x.forEach(w=>{C.push(jf(w,l.value))}),v=C.join(b)}break;case"number":l.value=uN(l.value,t.numberOptions),v=hN(y,l.value,t.numberOptions,t.groupSeparator,t.decimalSeparator,t.amountExpression,t.decimalFilledSymbol);break;case"enum":v=dN(y,t.enumConvertedDatas,t.enumDelimiter,t.textField,t.valueField);break;case"boolean":v=gN(y);break}return v}function h(){const y=c.value;Math.abs(y.scrollWidth-y.clientWidth)>2||Math.abs(y.scrollHeight-y.clientHeight)>2?f.value=m.value:f.value=""}return e.watch(()=>t.modelValue,(y,v)=>{y!==v&&n.emit("update:modelValue",y)}),()=>e.createVNode("span",{class:u.value,style:d.value,ref:c,onMouseenter:()=>h(),title:f.value},[m.value])}}),yN=e.defineComponent({name:"FTextDesign",props:ki,emits:["update:modelValue"],setup(t,n){const o=e.ref(!0),a=e.ref(!0),r=e.ref(""),i=e.ref(0),s=e.ref(0),l=e.ref(t.modelValue),p=e.computed(()=>({"f-form-control-text":!o.value,"f-form-context-textarea":o,"f-component-text-auto-size":a.value})),c=e.computed(()=>({textalign:r.value,height:!a.value&&i.value>0?`${i.value}px`:"","min-height":!a.value&&i.value>0?`${i.value}px`:"","max-height":!a.value&&s.value>0?`${s.value}px`:""}));e.computed(()=>"");const f=e.ref(),u=e.inject("design-item-context"),d=ye(f,u);return e.onMounted(()=>{f.value.componentInstance=d}),n.expose(d.value),()=>e.createVNode("span",{ref:f,class:p.value,style:c.value},[l.value])}}),Wf={install(t){t.component(Ai.name,Ai)},register(t,n,o){t.text=Ai,n.text=Hf},registerDesigner(t,n,o){t.text=yN,n.text=Hf}},bN=new Map([["appearance",ge]]),vN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/time-picker.schema.json",title:"time-picker",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a time picker",type:"string"},type:{description:"The type string of time picker component",type:"string",default:"time-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]};function xN(t,n,o){return n}const CN={title:"time-picker",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeHolder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-select",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中对齐"},{value:"right",name:"右对齐"}]}}}}}},$i={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},popupClassName:{type:String,default:""},placeholder:{type:String,default:""},defaultOpenValue:{type:Date,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},hideDisabledElements:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0}},qf=me($i,vN,bN,xN,CN),wN={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},defaultOpenValue:{type:Date,default:null},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},hideDisabledElements:{type:Boolean,default:!1}};function qe(t){return typeof t<"u"&&t!==null}function zf(t,n="hh:mm:ss"){if(!(!t||!n))return n.indexOf("ss")===-1&&t.split(":").length===3&&(n=n+":ss"),n.indexOf("A")>-1?(n=n.replace(/A/g,"a"),bc(t.toLowerCase(),n,new Date)):bc(t,n,new Date)}function Gf(t,n="hh:mm:ss",o="AM"){return!t||isNaN(t.getTime())?"":n.indexOf("A")>-1?(n=n.replace(/A/g,"a"),pn(t,n).toUpperCase()):pn(t,n)}function Uf(t,n){let o=t||"hh:mm:ss";return n?(o=o?o.replace(/H/g,"h"):"hh:mm:ss a",o.indexOf("a")===-1&&o.indexOf("A")===-1&&(o=o+" a")):o=o?o.replace(/h/g,"H"):"HH:mm:ss",o}class VN{constructor(){P(this,"hourStep",1);P(this,"minuteStep",1);P(this,"secondStep",1);P(this,"use12Hours",!1);P(this,"changedValue",e.ref({text:"",value:void 0}));P(this,"format","HH:mm:ss");P(this,"temporaryHours");P(this,"temporaryMinutes");P(this,"temporarySeconds");P(this,"temporaryText","");P(this,"temporaryValue");P(this,"temporarySelected12Hours");P(this,"temporaryDefaultOpenValue",new Date)}get hours(){return this.temporaryHours}set hours(n){n!==this.temporaryHours&&(this.use12Hours?this.selected12Hours==="PM"&&n!==12?this.temporaryHours=n+12:this.selected12Hours==="AM"&&n===12?this.temporaryHours=0:this.temporaryHours=n:this.temporaryHours=n,this.update())}get realHours(){return this.temporaryHours}get viewHours(){return this.use12Hours&&qe(this.temporaryHours)?this.calculateViewHour(this.temporaryHours):this.temporaryHours}get minutes(){return this.temporaryMinutes}set minutes(n){n!==this.temporaryMinutes&&(this.temporaryMinutes=n,this.update())}get seconds(){return this.temporarySeconds}set seconds(n){n!==this.temporarySeconds&&(this.temporarySeconds=n,this.update())}get defaultHours(){return this.defaultOpenValue.getHours()}get defaultViewHours(){const n=this.defaultOpenValue.getHours();return this.use12Hours&&qe(n)?this.calculateViewHour(n):n}get defaultRealHours(){return this.defaultOpenValue.getHours()}get defaultMinutes(){return this.defaultOpenValue.getMinutes()}get defaultSeconds(){return this.defaultOpenValue.getSeconds()}get default12Hours(){return this.defaultOpenValue.getHours()>=12?"PM":"AM"}get text(){return this.temporaryText}set text(n){n!==this.temporaryText&&(this.temporaryText=n)}get value(){return this.temporaryValue}set value(n){n!==this.temporaryValue&&(this.temporaryValue=n,qe(this.temporaryValue)&&Aa(this.temporaryValue)?(this.temporaryHours=this.temporaryValue.getHours(),this.temporaryMinutes=this.temporaryValue.getMinutes(),this.temporarySeconds=this.temporaryValue.getSeconds(),this.use12Hours&&qe(this.temporaryHours)&&(this.temporarySelected12Hours=this.temporaryHours>=12?"PM":"AM")):this.clearTimeValue())}get selected12Hours(){return this.temporarySelected12Hours}set selected12Hours(n){n.toUpperCase()!==this.temporarySelected12Hours&&(this.temporarySelected12Hours=n.toUpperCase(),this.update())}get defaultOpenValue(){return this.temporaryDefaultOpenValue.setHours(this.setValueByStep(this.temporaryDefaultOpenValue.getHours(),this.hourStep)),this.temporaryDefaultOpenValue.setMinutes(this.setValueByStep(this.temporaryDefaultOpenValue.getMinutes(),this.minuteStep)),this.temporaryDefaultOpenValue.setSeconds(this.setValueByStep(this.temporaryDefaultOpenValue.getSeconds(),this.secondStep)),this.temporaryDefaultOpenValue}set defaultOpenValue(n){this.temporaryDefaultOpenValue!==n&&(this.temporaryDefaultOpenValue=n,this.update())}get isEmpty(){return!(qe(this.temporaryHours)||qe(this.temporaryMinutes)||qe(this.temporarySeconds))}setFormat(n){this.format=n}setHours(n,o){return o?this:(this.setDefaultValueIfNil(),this.hours=n,this)}setUse12Hours(n){return this.use12Hours=n,this}setMinutes(n,o){return o?this:(this.setDefaultValueIfNil(),this.minutes=n,this)}setSeconds(n,o){return o?this:(this.setDefaultValueIfNil(),this.seconds=n,this)}setValue(n,o){return qe(o)&&(this.use12Hours=o),this.value=n,this}setValueByStep(n,o){let a=Math.floor(n/o);const r=n%o,i=o/2;return a=r>i?a+1:a,o*a}setDefaultOpenValue(n){return this.defaultOpenValue=n,this}setDefaultValueIfNil(){qe(this.temporaryValue)||(this.temporaryValue=new Date(this.defaultOpenValue))}update(){this.isEmpty?this.temporaryValue=void 0:(qe(this.temporaryHours)?this.temporaryValue.setHours(this.hours):this.temporaryHours=this.defaultHours,qe(this.temporaryMinutes)?this.temporaryValue.setMinutes(this.minutes):this.temporaryMinutes=this.defaultMinutes,qe(this.temporarySeconds)?this.temporaryValue.setSeconds(this.seconds):this.temporarySeconds=this.defaultSeconds,this.use12Hours&&(qe(this.temporarySelected12Hours)||(this.temporarySelected12Hours=this.default12Hours),this.selected12Hours==="PM"&&this.temporaryHours<12&&(this.temporaryHours+=12,this.temporaryValue.setHours(this.temporaryHours)),this.selected12Hours==="AM"&&this.temporaryHours>=12&&(this.temporaryHours-=12,this.temporaryValue.setHours(this.temporaryHours))),this.temporaryValue=new Date(this.temporaryValue),this.text=Gf(this.temporaryValue,this.format,this.selected12Hours),this.changedValue.value={text:this.text,value:this.temporaryValue})}clearTimeValue(){this.temporaryHours=void 0,this.temporaryMinutes=void 0,this.temporarySeconds=void 0,this.temporarySelected12Hours=void 0,this.temporaryValue=void 0}clear(){this.clearTimeValue(),this.update()}calculateViewHour(n){const o=this.temporarySelected12Hours||this.default12Hours;return o==="PM"&&n>12?n-12:o==="AM"&&n===0?12:n}}function NN(t,n,o,a,r,i){function s(f,u,d=0,m,g){const h=l(u,m,g),y=f.children[0].children[h]||f.children[0].children[0];p(f,y.offsetTop,d)}function l(f,u,d){if(u==="hour"){const m=t.disabledHours&&t.disabledHours();return c(m,o.value.map(g=>g.index).indexOf(f))}if(u==="minute"){const m=t.disabledMinutes&&t.disabledMinutes(d.hours);return c(m,a.value.map(g=>g.index).indexOf(f))}if(u==="second"){const m=t.disabledSeconds&&t.disabledSeconds(d.hours,d.minutes);return c(m,r.value.map(g=>g.index).indexOf(f))}return c([],i.value.map(m=>m.index).indexOf(f))}function p(f,u,d){if(d<=0){f.scrollTop=u;return}const g=(u-f.scrollTop)/d*10;Ky(()=>{f.scrollTop+=g,f.scrollTop!==u&&p(f,u,d-10)})}function c(f,u){return f&&f.length&&t.hideDisabledElements?u-f.reduce((d,m)=>d+(m<u?1:0),0):u}return{scrollToSelected:s}}function SN(t,n){function o(l){return l.index===t.viewHours||!qe(t.viewHours)&&l.index===t.defaultViewHours}function a(l){return l.index===t.minutes||!qe(t.minutes)&&l.index===t.defaultMinutes}function r(l){return l.index===t.seconds||!qe(t.seconds)&&l.index===t.defaultSeconds}function i(l){return l.value.toUpperCase()===t.selected12Hours||!qe(t.selected12Hours)&&l.value.toUpperCase()===t.default12Hours}function s(l,p){let c="";const f=` ${n}-select-option-selected `,u=` ${n}-select-option-disabled `;let d=!1;return p==="hour"?d=o(l):p==="minute"?d=a(l):p==="second"?d=r(l):d=i(l),d&&(c+=f),p==="12-hour"||l.disabled&&(c+=u),c}return{getSelectedClass:s}}const Ei=e.defineComponent({name:"FTimePickerTimeView",props:wN,emits:["valueChange","formatedValueChange"],setup(t,n){const o="time-picker-panel",a=e.ref(0),r=e.ref([]),i=e.ref([]),s=e.ref([]),l=e.ref([]),p=e.ref(),c=e.ref(),f=e.ref(),u=e.ref(),d=new VN,{scrollToSelected:m}=NN(t,n,r,i,s,l),{getSelectedClass:g}=SN(d,o),h=e.ref(t.hourStep),y=e.ref(t.minuteStep),v=e.ref(t.secondStep),b=e.ref(),x=e.ref(""),C=e.ref(),w=e.ref(t.hideDisabledElements),V=e.ref(0);e.watch(()=>t.defaultOpenValue,z=>{qe(z)&&(b.value=z)}),e.watch(b,z=>{qe(z)&&d.setDefaultOpenValue(z)}),b.value=t.defaultOpenValue,e.watch(d.changedValue,z=>{n.emit("valueChange",z)}),e.watch(()=>t.modelValue,z=>{N(z)}),e.watch(()=>t.format,z=>{qe(z)?x.value=z:x.value="HH:mm:ss"}),e.watch(x,z=>{qe(z)&&(d.setFormat(x.value),V.value=0,$.value&&V.value++,T.value&&V.value++,E.value&&V.value++,C.value&&(V.value++,W()),a.value=V.value*66)}),e.watch(()=>t.use12Hours,z=>{C.value=z}),e.watch(C,z=>{x.value=Uf(x.value,z),d.setUse12Hours(z)}),e.watch(()=>t.disabledHours,()=>{F()}),e.watch(()=>t.disabledMinutes,()=>{R()}),e.watch(()=>t.disabledSeconds,()=>{O()});function N(z){if(qe(z)){d.text=z;const q=zf(d.text,x.value);d.setValue(q,C.value),G()}else d.setUse12Hours(C.value)}function S(){let z=[];return t.disabledHours&&(z=t.disabledHours(),C.value&&(d.selected12Hours==="PM"?z=z.filter(q=>q>=12).map(q=>q>12?q-12:q):z=z.filter(q=>q<12||q===24).map(q=>q===24||q===0?12:q))),z}function D(z="hour"){return x.value?x.value.indexOf(z[0].toUpperCase())>-1||x.value.indexOf(z[0].toLowerCase())>-1:!1}const k=e.computed(()=>({"time-picker-panel":!0,"time-picker-panel-column-3":!0,"time-picker-panel-placement-bottomLeft":!0,"f-area-show":!0})),A=e.computed(()=>({width:C.value?`${a.value}px`:"100%"})),$=e.computed(()=>D("hour")),T=e.computed(()=>D("minute")),E=e.computed(()=>D("second"));function B(z,q=1,j=0){return q=Math.ceil(q),new Array(Math.ceil(z/q)).fill(0).map((Z,U)=>(U+j)*q)}function I(){if($.value&&p.value&&m(p.value,qe(d.viewHours)?d.viewHours:d.defaultViewHours,0,"hour",d),T.value&&c.value&&m(c.value,qe(d.minutes)?d.minutes:d.defaultMinutes,0,"minute",d),E.value&&f.value&&m(f.value,qe(d.seconds)?d.seconds:d.defaultSeconds,0,"second",d),C.value&&u.value){const q=(qe(d.selected12Hours)?d.selected12Hours:d.default12Hours)==="AM"?0:1;m(u.value,q,0,"12-hour",d)}}function F(){let z=24,q=0;C.value&&(z=12,q=1);const j=S();if(r.value=B(z,h.value,q).map(Z=>({index:Z,disabled:j.length>0&&j.indexOf(Z)!==-1})),C.value&&r.value[r.value.length-1].index===12){const Z=[...r.value];Z.unshift(Z[Z.length-1]),Z.splice(Z.length-1,1),r.value=Z}r.value=r.value.filter(Z=>!(w.value&&Z.disabled))}function R(){i.value=B(60,y.value).map(z=>({index:z,disabled:!!t.disabledMinutes&&t.disabledMinutes(d.hours).indexOf(z)!==-1})),i.value=i.value.filter(z=>!(w.value&&z.disabled))}function O(){s.value=B(60,v.value).map(z=>({index:z,disabled:!!t.disabledSeconds&&t.disabledSeconds(d.hours,d.minutes).indexOf(z)!==-1})),s.value=s.value.filter(z=>!(w.value&&z.disabled))}function W(){const z=x.value.includes("A");l.value=[{index:0,value:z?"AM":"am"},{index:1,value:z?"PM":"pm"}],l.value=l.value.filter(()=>!w.value)}function M(z,q){if(z.stopPropagation(),d.setHours(q.index,q.disabled),!q.disabled){if(m(p.value,q.index,120,"hour",d),t.disabledMinutes!==null){R();const j=i.value.filter(Z=>!Z.disabled);if(!j.find(Z=>Z.index===d.minutes)){const{index:Z,disabled:U}=j[0];d.setMinutes(Z,U)}}(t.disabledSeconds!==null||t.disabledMinutes!==null)&&O()}}function _(z,q){z.stopPropagation(),d.selected12Hours=q.value,F(),R(),O(),m(u.value,q.index,120,"12-hour",d)}function H(z,q){if(z.stopPropagation(),d.setMinutes(q.index,q.disabled),!q.disabled&&(m(c.value,q.index,120,"minute",d),t.disabledSeconds!==null)){O();const j=s.value.filter(Z=>!Z.disabled);if(!j.find(Z=>Z.index===d.seconds)){const{index:Z,disabled:U}=j[0];d.setSeconds(Z,U)}}}function L(z,q){z.stopPropagation(),d.setSeconds(q.index,q.disabled),!q.disabled&&m(f.value,q.index,120,"second",d)}function G(){F(),R(),O(),W()}e.onMounted(()=>{x.value=t.format,C.value=t.use12Hours,N(t.modelValue),G(),setTimeout(()=>{I()},10)});function Y(){return t.showHeader?e.createVNode("div",{class:o+"-combobox time-picker-panel-header",style:A.value},[$.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"+T.value?"time-header-split":""},[e.createTextVNode("时")])])]),T.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"+E.value?"time-header-split":""},[e.createTextVNode("分")])])]),E.value&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"},[e.createTextVNode("秒")])])]),t.use12Hours&&e.createVNode("div",{class:o+"-select",style:"height: 32px"},[e.createVNode("ul",null,[e.createVNode("li",{class:"time-header"},null)])])]):null}return()=>e.createVNode("div",{class:k.value},[e.createVNode("div",{class:"farris-timer-picker"},[e.createVNode("div",{class:o+"-inner"},[Y(),e.createVNode("div",{class:o+"-combobox",style:A.value},[$.value&&e.createVNode("div",{class:o+"-select",ref:p},[e.createVNode("ul",null,[r.value.map(z=>e.createVNode("li",{class:g(z,"hour"),onClick:q=>M(q,z)},[`${z.index}`]))])]),T.value&&e.createVNode("div",{class:o+"-select",ref:c},[e.createVNode("ul",null,[i.value.map(z=>e.createVNode("li",{class:g(z,"minute"),onClick:q=>H(q,z)},[`${z.index}`]))])]),E.value&&e.createVNode("div",{class:o+"-select",ref:f},[e.createVNode("ul",null,[s.value.map(z=>e.createVNode("li",{class:g(z,"second"),onClick:q=>L(q,z)},[`${z.index}`]))])]),C.value&&e.createVNode("div",{class:o+"-select",ref:u},[e.createVNode("ul",null,[l.value.map(z=>e.createVNode("li",{class:g(z,"12-hour"),onClick:q=>_(q,z)},[`${z.value}`]))])])])])])])}}),Bi=e.defineComponent({name:"FTimePicker",props:$i,emits:["update:modelValue","valueChange","clear"],setup(t,n){const o='<span class="f-icon f-icon-timepicker"></span>',a=e.ref(t.modelValue),r=e.ref(null),i=e.ref(),s=e.computed(()=>Uf(t.format,t.use12Hours));function l(){a.value="",n.emit("clear")}function p(){if(a.value){const u=zf(a.value,s.value);a.value=Gf(u,s.value)}}function c(){p()}function f(u){a.value=u.text}return p(),e.watch(()=>t.modelValue,u=>{a.value=u}),e.watch(a,u=>{n.emit("valueChange",u)}),()=>e.createVNode(dt,{ref:r,modelValue:a.value,"onUpdate:modelValue":u=>a.value=u,disable:t.disable,readonly:t.readonly,editable:t.editable,buttonContent:o,placeholder:t.placeholder,enableClear:!0,onClear:l,onBlur:c},{default:()=>[e.createVNode(Ei,e.mergeProps({ref:i},t,{onValueChange:f}),null)]})}}),TN=e.defineComponent({name:"FTimePickerDesign",props:$i,emits:["datePicked","update:modelValue"],setup(t,n){const o='<span class="f-icon f-icon-timepicker"></span>',a=e.ref(t.modelValue),r=e.ref(),i=e.ref(),s=e.inject("design-item-context"),l=ye(i,s);e.onMounted(()=>{i.value.componentInstance=l}),n.expose(l.value);function p(){}return()=>e.createVNode("div",{ref:i},[e.createVNode(dt,{ref:r,modelValue:a.value,"onUpdate:modelValue":c=>a.value=c,buttonContent:o,enableClear:!0,onClickButton:()=>void 0},{default:()=>[e.createVNode(e.resolveComponent("f-time-picker-time-view"),null,null)]})])}}),Yf={install(t){t.component(Bi.name,Bi).component(Ei.name,Ei)},register(t,n,o){t["time-picker"]=Bi,n["time-picker"]=qf},registerDesigner(t,n,o){t["time-picker"]=TN,n["time-picker"]=qf}},DN=e.defineComponent({name:"FTransferDesign",props:pa,emits:["change"],setup(t,n){const o=e.ref(t.identifyField),a=e.ref("已选:"),r=e.ref("项数据"),i=e.ref(t.displayType),s=e.ref(!1),l=e.ref(t.dataSource),p=e.ref(t.selections||[]),c=e.computed(()=>p.value.map(k=>k[o.value])),f=new Map;function u(){const k=new Map,A=t.selectionValues||[];A.length&&A.reduce((T,E)=>(T.set(E,!0),T),k);const $=t.selections||[];$.length&&(k.clear(),$.reduce((T,E)=>(T.set(E[o.value],!0),T),k)),p.value.length||(p.value=l.value.filter(T=>k.has(T[o.value])).map(T=>Object.assign({},T))),l.value.forEach(T=>{const E=T[o.value],B=k.has(E);T.checked=B,B&&f.set(E,T)})}u();const d=e.computed(()=>i.value==="List"),m=e.computed(()=>i.value==="Tree");function g(k){p.value=k.map(A=>Object.assign({},A)),n.emit("change",p.value)}function h(){return e.createVNode(Tt,{class:"f-utils-fill",data:l.value,"multi-select":!0,draggable:!1,header:"Search",headerClass:"transfer-search-box","selection-values":c.value,onSelectionChange:g},{default:()=>[e.createTextVNode(" ")]})}function y(){return e.createVNode(e.Fragment,null,null)}function v(){return e.createVNode("div",{class:"f-utils-fill option-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column option-pane-content f-utils-fill"},[e.createVNode("div",{class:"container columns-box d-flex f-utils-fill"},[d.value&&h(),m.value&&y()])])])}function b(k){const A=k[o.value];if(A!==null||A!==void 0){p.value=p.value.filter(T=>T[o.value]!==A);const $=f.get(A);$&&($.checked=!1,f.delete(A)),n.emit("change",p.value)}}function x(k){const A=new Map;p.value.reduce(($,T)=>($.set(T[o.value],T),$),A),p.value=k.map($=>A.get($[o.value])),n.emit("change",p.value)}function C(){return e.createVNode(Tt,{style:"flex:1",data:p.value,draggable:!0,view:"DraggableView","keep-order":!0,onChange:x,onRemoveItem:b},{default:()=>[e.createTextVNode(" ")]})}function w(){return e.createVNode("div",{class:"f-utils-fill selection-pane d-flex flex-column"},[e.createVNode("div",{class:"f-utils-flex-column selection-pane-content f-utils-fill"},[e.createVNode("div",{class:"selection-pane-title"},[e.createVNode("span",{class:"selection-title"},[a.value]),e.createVNode("span",{class:"selection-count"},[p.value&&p.value.length]),e.createVNode("span",{class:"selection-item-title"},[r.value])]),e.createVNode("div",{class:"container columns-box f-utils-fill d-flex"},[C()])])])}const V=e.computed(()=>({transfer:!0,row:!0,"f-utils-fill":s.value})),N=e.ref(),S=e.inject("design-item-context"),D=ye(N,S);return e.onMounted(()=>{N.value.componentInstance=D}),n.expose(D.value),()=>e.createVNode("div",{ref:N,class:V.value,style:"height:480px"},[v(),w()])}}),Zf={install(t){t.component(wn.name,wn)},register(t,n,o){t.transfer=wn,n.transfer=Nl},registerDesigner(t,n,o){t.transfer=DN,n.transfer=Nl}},kN=new Map([["appearance",ge]]);function AN(t,n,o){return n}const $N={title:"tree-view",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},EN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tree-view.schema.json",title:"tree-view",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for tree-view",type:"string"},type:{description:"The type string of tree-view",type:"string",default:"tree-view"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},Fi={columns:{type:Array,default:[{field:"name",title:"",dataType:"string"}]},displayField:{type:String,default:"name",require:!0},showLines:{type:Boolean,default:!1},data:{type:Object,default:[]},disable:{type:Boolean,default:!1},fit:{type:Boolean,default:!1},height:{type:Number,default:-1},id:{type:String,default:""},idField:{type:String,default:"id",require:!0},minHeight:{type:Number,default:300},minWidth:{type:Number,default:400},pagination:{type:Object,default:{enable:!0,size:-1}},selection:{type:Object,default:{enableSelectRow:!0,multiSelect:!1,multiSelectMode:"DependOnCheck",showCheckbox:!1,showSelectAll:!1,showSelection:!0}},selectionValues:{type:Array,default:[]},showTreeNodeIcons:{type:Boolean,default:!1},treeNodeIconsData:{type:[Object,String],default:{}},iconField:{type:String,default:""},width:{type:Number,default:-1},newDataItem:{type:[Function,Object],default:()=>{}},lineColor:{type:String,default:"#9399a0"},cellHeight:{type:Number,default:28},onOutputValue:{type:Function,default:()=>{}},onCurrentEvent:{type:Function,default:()=>{}},hierarchy:{type:Object,default:{cascadeOption:{autoCheckChildren:!1,autoCheckParent:!1,selectionRange:"All"},parentIdField:"parent"}},rowOption:{type:Object}},Kf=me(Fi,EN,kN,AN,$N);function Qf(t,n,o,a,r,i,s,l,p,c,f,u,d){const{calculateCellPositionInRow:m}=a,{columnContext:g}=r,{gridDataStyle:h}=d,{renderDataRow:y}=gm(t,n,g,o,i,s,l,p,c,f);function v(){const x=m(g.value.primaryColumns);return o.value.filter(C=>C.visible!==!1).map(C=>y(C,x))}function b(){return e.createVNode("div",{class:"fv-tree-data",style:h.value},[v()])}return{renderTreeArea:b}}function BN(t,n,o,a){var h,y,v,b,x,C;const{idField:r}=o,i=e.ref(((y=(h=t.hierarchy)==null?void 0:h.cascadeOption)==null?void 0:y.autoCheckChildren)||!1),s=e.ref(((b=(v=t.hierarchy)==null?void 0:v.cascadeOption)==null?void 0:b.autoCheckParent)||!1),l=e.ref(((C=(x=t.hierarchy)==null?void 0:x.cascadeOption)==null?void 0:C.selectionRange)||"All");e.watch(()=>{var w;return(w=t.hierarchy)==null?void 0:w.cascadeOption},w=>{i.value=w?!!w.autoCheckChildren:!1,s.value=w?!!w.autoCheckParent:!1,l.value=w?w.selectionRange:"All"});function p(w,V){for(let N=0;N<V.length;N++)if(!w.includes(V[N]))return!1;return!0}function c(w,V){return w.filter(S=>V.indexOf(S)===-1)}const f=e.computed(()=>l.value==="OnlyParent"),u=e.computed(()=>l.value==="OnlyChildren");function d(w,V){let N=w;const S=n.value[V],D=S.raw[r.value],k=Array.from(S.raw.__fv_descendant_index__).map(I=>n.value[I]),A=k.map(I=>I.raw[r.value]),$=p(w,A),T=p(w,[D]);return T&&$&&f.value&&(N=c(w,A),k.forEach(I=>{I.disable=!0})),T&&$&&u.value&&(N=c(w,[D]),k.forEach(I=>{I.disable=!0})),N}function m(w,V){let N=w;const S=V[r.value],D=Array.from(V.__fv_children_index__).map(B=>n.value[B]),k=D.map(B=>B.raw[r.value]),A=p(w,k),$=p(w,[V[r.value]]);return $&&A&&f.value&&(N=c(w,k),D.forEach(B=>{B.disable=!0})),$&&A&&u.value&&(N=c(w,[S]),D.forEach(B=>{B.disable=!0})),N}function g(w,V){let N=w.map(A=>A[r.value]);return V.__fv_parent_index__>0&&(N=d(N,V.__fv_parent_index__)),V.__fv_children_index__.length>0&&(N=m(N,V)),w.filter(A=>N.includes(A[r.value]))}return{autoCheckChildren:i,autoCheckParent:s,interactAfterCheckHierarchyItem:g}}function Ii(t,n,o,a,r){const{select:i,unSelect:s,indeterminate:l,getSelectedItems:p}=a,{autoCheckChildren:c,autoCheckParent:f,interactAfterCheckHierarchyItem:u}=BN(t,n,o),{idField:d}=o;function m(){return n.value.filter(V=>!!V.checked).map(V=>V.raw.__fv_index__)}function g(V,N){return V.filter(D=>N.indexOf(D)===-1)}function h(V){const N=m();V.raw.__fv_children_index__.some(D=>N.includes(D))&&!!V.checked!==!0&&l(V)}function y(V){let N=V.raw.__fv_parent_index__;for(;N!==void 0;){const S=m(),D=n.value[N],k=g(D.raw.__fv_children_index__,S);k.length===D.raw.__fv_children_index__.length&&k.length!==0?s(D):k.length===0?f.value&&i(D):k.length<D.raw.__fv_children_index__.length&&D.checked!==!0&&l(D),N=D.raw.__fv_parent_index__}}function v(V){const N=!!V.checked;c.value&&V.raw.__fv_children_index__.map(S=>n.value[S]).forEach(S=>{N?i(S):s(S)})}function b(V){v(V),y(V);const N=V.raw;let S=p();S=u(S,N),h(V),r.emit("selectionChange",S)}function x(V,N){let S=-1;if(V.raw.__fv_parent_index__>-1){const $=n.value[V.raw.__fv_parent_index__].raw.__fv_descendant_index__,T=$.length>1,E=$.findIndex(I=>I===N),B=E===$.length-1;S=T?B?$[E-1]:$[E+1]:-1}return S>-1?n.value[S]:null}function C(V){return V.raw.__fv_parent_index__>-1?n.value[V.raw.__fv_parent_index__]:null}function w(V){const N=n.value[V];if(!N)return null;const S=x(N,V),k=S!==null?S:C(N);return k?k.raw[d.value]:null}return{getNextSelectableHierarchyItemId:w,toggleSelectHierarchyItem:b}}const zo=e.defineComponent({name:"FTreeView",props:Fi,emits:["outputValue","currentEvent","selectionChange"],setup(t,n){const o=e.ref(),a=e.ref(!1),r=e.ref([]),i=Xt(t),s=Ut(t),l=Gt(t,new Map,s,i),p=Jt(t,l,i,r,n),c=Ii(t,r,i,p,n),f=e.computed(()=>({"fv-tree":!0})),u=e.computed(()=>({"fv-tree-content":!0})),{containerStyleObject:d}=qn(t);function m(L){}function g(){return[]}function h(){return[]}const y=e.ref(t.columns),v=zn(t),{columnContext:b}=v,x=0,C=e.computed(()=>l.dataView.value.length),w=Qt(t,i),V=Pt(),N=Zt(t,{},V),S=Kt(t,w,s,i,V,N),D=Yt(t,y,l,C,x,S),{getVisualData:k}=D,A=bn(t,b);r.value=k(0,C.value+x-1);const $=Un(t,n,p,i),T=Gn(t,l,r,b,D,C,x,e.ref(0)),{renderTreeArea:E}=Qf(t,n,r,A,v,l,w,s,$,p,c,D,T);function B(){const L=p.getSelectionRow();return L?L.dataIndex-1:-1}function I(){const L=B();l.insertNewDataItem(L),r.value=k(0,C.value+x-1)}function F(){const L=B();l.insertNewChildDataItem(L),r.value=k(0,C.value+x-1)}function R(){const L=B(),G=c.getNextSelectableHierarchyItemId(L);l.removeHierarchyDataItem(L),r.value=k(0,C.value+x-1),G&&p.selectItemById(G)}function O(L,G){l.editDataItem(L,G),r.value=k(0,C.value+x-1)}function W(){}function M(){}function _(L){if(L>-1){const G=r.value[L];p.selectItem(G)}}function H(L){if(L){const G=p.getSelectionRow();if(l.load(L),r.value=k(0,C.value+x-1),G&&G.raw&&G.raw.originalId){const Y=L.findIndex(z=>z.originalId===G.raw.originalId);Y>-1&&_(Y)}}}return n.expose({addNewDataItem:I,addNewChildDataItem:F,removeDataItem:R,editDataItem:O,acceptDataItem:W,cancelDataItem:M,selectItem:_,updateDataSource:H}),e.watch(()=>[t.data],([L])=>{const G=p.getSelectionRow();if(l.load(L),r.value=k(0,C.value+x-1),G&&G.raw&&G.raw.originalId){const Y=L.findIndex(z=>z.originalId===G.raw.originalId);Y>-1&&_(Y)}}),()=>e.createVNode("div",{class:f.value,style:d.value,onWheel:m},[e.createVNode("div",{ref:o,class:u.value,onMouseover:()=>{a.value=!0},onMouseleave:()=>{a.value=!1}},[E(),g(),h()])])}}),FN=e.defineComponent({name:"FTreeViewDesign",props:Fi,emits:["outputValue","currentEvent","selectionChange"],setup(t,n){const o=e.ref(),a=e.inject("design-item-context"),r=ye(o,a);e.ref(t.idField);const i=e.ref(),s=e.ref(!1),l=e.ref([]),p=Ut(t),c=Xt(t),f=Gt(t,new Map,p,c),u=Jt(t,f,c,l,n),d=Ii(t,l,c,u,n),m=e.computed(()=>({"fv-tree":!0})),g=e.computed(()=>({"fv-tree-content":!0})),{containerStyleObject:h}=qn(t);function y(R){}function v(){return[]}function b(){return[]}const x=e.ref(t.columns),C=zn(t),{columnContext:w}=C,V=0,N=e.computed(()=>f.dataView.value.length),S=Qt(t,c),D=Pt(),k=Zt(t,{},D),A=Kt(t,S,p,c,D,k),$=Yt(t,x,f,N,V,A),{getVisualData:T}=$,E=bn(t,w);l.value=T(0,N.value+V-1);const B=Un(t,n,u,c),I=Gn(t,f,l,w,$,N,V,e.ref(0)),{renderTreeArea:F}=Qf(t,n,l,E,C,f,S,p,B,u,d,$,I);return n.expose(r.value),()=>e.createVNode("div",{class:m.value,style:h.value,onWheel:y},[e.createVNode("div",{ref:i,class:g.value,onMouseover:()=>{s.value=!0},onMouseleave:()=>{s.value=!1}},[F(),v(),b()])])}}),Xf={install(t){t.component(zo.name,zo)},register(t,n,o){t["tree-view"]=zo,n["tree-view"]=Kf},registerDesigner(t,n,o){t["tree-view"]=FN,n["tree-view"]=Kf}},IN={checked:{type:Boolean,default:!1},id:{type:String,default:""},disabled:{type:Boolean,default:!1}},MN={showInfo:{type:Boolean,default:!0},status:{type:String,default:"normal"},percent:{type:Number,default:0},maxWidth:{type:Number,default:0}},ON={selectText:{type:String,default:"选择文件"},disabled:{type:Boolean,default:!1},enableMulti:{type:Boolean,default:!0},accept:{type:String,default:"*"},options:{type:Object,default:{}},uploadedCount:{type:Number,default:0},extendConfig:{type:Object,default:{}},uploadServerToken:{type:String,default:""}},PN=e.defineComponent({name:"FUploadProgress",props:MN,setup(t,n){const{showInfo:o,status:a,maxWidth:r,percent:i}=e.toRefs(t);return()=>e.createVNode("div",{class:["f-progress upload-progress","upload-progress-status-"+a.value,"f-progress-status-"+a.value,"upload-progress-line",o.value?"upload-progress-show-info":""]},[e.createVNode("div",{class:"upload-progress-outer",style:{"max-width":r.value>0?r.value+"px":"auto"}},[e.createVNode("div",{class:"upload-progress-inner"},[e.createVNode("div",{class:"upload-progress-bg f-progress-bg",style:{width:i.value+"%"}},null)])]),o.value?e.createVNode("span",{class:"upload-progress-text"},[a.value==="error"||a.value==="success"?e.createVNode("span",{class:["upload-progress-text-icon f-icon","f-icon-"+a.value]},null):e.createVNode(e.Fragment,null,[i.value,e.createTextVNode("%")])]):""])}}),Jf=e.defineComponent({name:"FPreviewCheckbox",props:IN,emits:["checkedChange"],setup(t,n){const{disabled:o}=e.toRefs(t),a=e.ref(t.checked),r=i=>{i.stopPropagation(),o.value||(a.value=!a.value,n.emit("checkedChange",{checked:a.value,id:t.id}))};return e.watch(()=>t.checked,i=>{a.value=i}),()=>e.createVNode("div",{class:"preview-checkbox d-inline-flex align-middle"},[e.createVNode("div",{class:"custom-control custom-checkbox f-checkradio-single m-0"},[e.createVNode("input",{title:"custom-control-input",class:"custom-control-input",type:"checkbox",disabled:o.value,checked:a.value},null),e.createVNode("label",{class:"custom-control-label",onClick:i=>r(i),onMousedown:i=>i.stopPropagation()},null)])])}});var St=(t=>(t[t.Queue=0]="Queue",t[t.Uploading=1]="Uploading",t[t.Done=2]="Done",t[t.Cancelled=3]="Cancelled",t[t.Remove=4]="Remove",t[t.Error=5]="Error",t))(St||{});class _N{constructor(n={},o={}){P(this,"uploadConfig");P(this,"removeConfig");const a={type:"config",url:"",timeout:0,headers:null,data:{}};this.uploadConfig=Object.assign({},a,n),this.removeConfig=Object.assign({},a,o)}}function Mi(t,n){const{formatTo:o}=_a();return o(t,n)}function ep(t,n){if(!n)return"";let o="";return t.indexOf(".")===-1&&n.hasOwnProperty(t)?o=n[t]:o=t.split(".").reduce((a,r)=>a?a[r]:null,n),o}function RN(t){return(n,o)=>{if(!n.hasOwnProperty(t)||n[t]===void 0||n[t]===null)return 1;if(!o.hasOwnProperty(t)||o[t]===void 0||o[t]===null)return-1;if(t!=="createTime"){let i="",s="";return t.indexOf(".")>-1?(i=ep(t,n),s=ep(t,o)):(i=n[t],s=o[t]),i>s?1:-1}const a=new Date(n[t]),r=new Date(o[t]);return a.getTime()>r.getTime()?-1:1}}function tp(t){return(t||[]).findIndex(o=>o==="*")===-1}function np(t){return t!=="0 Byte"}function Rn(t){if(t===0)return"0 Byte";const n=1024,o=["Bytes","KB","MB","GB","TB","PB"],a=Math.floor(Math.log(t)/Math.log(n));return parseFloat((t/n**a).toFixed(2))+" "+o[a]}function op(t,n){return t&&(t.hasOwnProperty("allowedContentTypes")&&(n.allowedContentTypes=t.allowedContentTypes||["*"],n.allowedContentTypes=n.allowedContentTypes&&n.allowedContentTypes.length>0?n.allowedContentTypes:["*"]),t.hasOwnProperty("maxUploads")&&(n.maxUploads=t.maxUploads||0),t.hasOwnProperty("maxFileSize")&&(n.maxFileSize=Rn(1024*1024*(parseInt(String(t.maxFileSize),10)||1)))),n}function ap(t){let n="ffilepreview--filetype";if(!t)return n+"-any";const o=t.lastIndexOf(".");let a="";switch(o>-1&&(a=t.substring(o+1).toLocaleLowerCase()),a){case"pdf":n+="-pdf";break;case"jpeg":case"jpg":case"gif":case"svg":case"png":case"bmp":n+="-img";break;case"ppt":case"pptx":n+="-ppt";break;case"doc":case"docx":n+="-doc";break;case"xls":case"xlsx":n+="-xls";break;case"txt":n+="-txt";break;case"zip":n+="-zip";break;case"wps":n+="-wps";break;case"wpt":n+="-wpt";break;default:n+="-any"}return n}function rp(t){var n;if(t.type==="done")return 100;if(t.file&&t.file.progress){if(t.file.progress.status===St.Uploading){const o=((n=t.file.progress.data)==null?void 0:n.percentage)||5;return o>5?o:5}return 5}return 5}function LN(t){let n=t;return t?(typeof t=="string"&&(n=parseInt(t,10)),Rn(n)):"0 Byte"}const HN=()=>Math.random().toString(36).substring(7);function ip(t,n){return{fileIndex:n,id:HN(),name:t.name,size:t.size,type:t.type,form:new FormData,progress:{status:St.Queue,data:{percentage:0,speed:0,speedHuman:`${Rn(0)}/s`,startTime:null,endTime:null,eta:null,etaHuman:null}},lastModifiedDate:Mi(new Date(t.lastModified),"yyyy-MM-dd HH:mm:ss"),nativeFile:t}}function jN(t){const n=[];return t.forEach(o=>{const a={id:"",name:"",size:0,type:"",extend:null,extendHeaders:null,createTime:""};for(const r in a){const i=r.replace("extend","response").replace("createTime","lastModifiedDate");o.hasOwnProperty(i)&&(i==="lastModifiedDate"?a[r]=Mi(o[i],"yyyy-MM-dd HH:mm:ss"):a[r]=o[i])}n.push(a)}),n}function WN(t,n){return t?n<=t*1024*1024:!0}function qN(t){return t.find(n=>n==="*")!==void 0}function zN(t,n){if(!t||t.length===0||qN(t))return!0;if(n.lastIndexOf(".")<0)return!1;const o=n.substr(n.lastIndexOf("."));return t.findIndex(a=>a.toLowerCase()===o.toLowerCase())>-1}function GN(t){if(t)return t.split(`
|
|
7
7
|
`).map(n=>n.split(/: */,2)).filter(n=>n[0]).reduce((n,o)=>(n[o[0]]=o[1],n),{})}function sp(t){return new Date(t*1e3).toISOString().substr(11,8)}class UN extends _N{upload(n,o,a,r){const i=n[0];return new Promise((s,l)=>{var v,b;const p=o.url||a.url||"",c=o.method||"POST",f=o.data||{},u=o.headers||{},d=new XMLHttpRequest,m=new Date().getTime();let g=((v=i.progress)==null?void 0:v.data)&&i.progress.data.startTime||m,h=0,y=null;d.upload.addEventListener("progress",x=>{var C;if(x.lengthComputable){const w=Math.round(x.loaded*100/x.total),V=new Date().getTime()-m;h=Math.round(x.loaded/V*1e3),g=((C=i.progress)==null?void 0:C.data)&&i.progress.data.startTime||new Date().getTime(),y=Math.ceil((x.total-x.loaded)/h),i.progress={status:St.Uploading,data:{percentage:w,speed:h,speedHuman:`${Rn(h)}/s`,startTime:g,endTime:null,eta:y,etaHuman:sp(y)}},r({type:"uploading",files:[i]})}},!1),d.upload.addEventListener("error",x=>{l(x)}),d.onreadystatechange=()=>{if(d.readyState===XMLHttpRequest.DONE){const x=Math.round(i.size/(new Date().getTime()-g)*1e3);i.progress={status:St.Done,data:{percentage:100,speed:x,speedHuman:`${Rn(x)}/s`,startTime:g,endTime:new Date().getTime(),eta:y,etaHuman:sp(y||0)}},i.responseStatus=d.status;try{i.response=JSON.parse(d.response)}catch{i.response=d.response}i.responseHeaders=GN(d.getAllResponseHeaders()),s({type:"done",files:[i]})}},d.open(c,p,!0),d.withCredentials=!!o.withCredentials;try{const x=i.nativeFile;Object.keys(u).forEach(w=>d.setRequestHeader(w,u[w]));let C;o.includeWebKitFormBoundary!==!1?(Object.keys(f).forEach(w=>{var V;return(V=i.form)==null?void 0:V.append(w,f[w])}),(b=i.form)==null||b.append(o.fieldName||"file",x,x.name),C=i.form):C=x,d.send(C)}catch(x){l(x)}return()=>{d.abort()}})}remove(n,o,a,r){return new Promise((i,s)=>{i({type:"removed",files:n})})}}const lp={getNotify:(t="")=>{let n;return t&&e.inject(t,null)&&(n=e.inject(t)),n||(n=new Fo),n},getServerAPI:(t="")=>{let n;if(t&&e.inject(t,null)){const o=e.inject(t);o&&o()&&(n=o())}return n||(n=new UN),n}};class YN{constructor(n,o){P(this,"queue");P(this,"uploadOpts",{allowedContentTypes:["*"],maxUploads:0,maxFileSize:12,concurrency:Number.POSITIVE_INFINITY,uploadedCount:0});P(this,"extendServerConfig",null);P(this,"uploadServerSer");this.context=n,this.serverToken=o,this.queue=[],this.uploadServerSer=lp.getServerAPI(this.serverToken)}handleResultFromServer(n){n.type==="removed"&&(this.queue=this.queue.filter(o=>{var a;return((a=o.progress)==null?void 0:a.status)!==St.Remove}),n.hasOwnProperty("message")||(n.message="被删除")),n.type==="error"&&(this.queue=this.queue.filter(o=>n.files&&n.files.findIndex(a=>o.id===a.id)<0)),this.context.emit("stateChange",n)}setOptions(n){n&&(this.uploadOpts=Object.assign(this.uploadOpts,n))}handleFiles(n){const o=Array.from(n).reduce((a,r,i)=>{const s=a.length+this.queue.length+1,l=this.rejectedReason(r.name,s,r.size);if(l.allowed)a=a.concat(r);else{const p=ip(r,i);this.context.emit("stateChange",{type:"rejected",file:p,message:l.message})}return a},[]);[].map.call(o,(a,r)=>{const i=ip(a,r);this.queue.push(i),this.context.emit("stateChange",{type:"addedToQueue",file:i})}),this.context.emit("stateChange",{type:"allAddedToQueue"})}rejectedReason(n,o,a){let r=!1,i="";return this.queue.findIndex(l=>l.name===n)>-1?i="上传失败:已存在同名文件":this.uploadOpts.allowedContentTypes&&!zN(this.uploadOpts.allowedContentTypes,n)?i=`上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档`:this.exceedMaxUpload(o)?i=`上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制`:WN(this.uploadOpts.maxFileSize,a)?a===0?i="上传失败:不允许文件为空":r=!0:i=`上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`,{allowed:r,message:i}}exceedMaxUpload(n=0){if(!this.uploadOpts||!this.uploadOpts.maxUploads)return!1;const o=this.uploadOpts.uploadedCount||0;return this.uploadOpts.maxUploads>0&&(this.uploadOpts.maxUploads<=o||n+o>this.uploadOpts.maxUploads)}handleUploadEvent(n){switch(n.type){case"upload":const o=this.queue.findIndex(i=>i===n.file);o!==-1&&n.file&&this.serverMethod({files:[this.queue[o]],event:n});break;case"remove":if(!n.id)return;const a=this.queue.findIndex(i=>i.id===n.id);if(a!==-1&&this.queue[a]&&this.queue[a].progress){const{progress:i}=this.queue[a];i&&(i.status=St.Remove)}break;case"removeAll":const r=this.queue.filter(i=>{var s;return((s=i==null?void 0:i.progress)==null?void 0:s.status)===St.Queue});r.length&&(this.context.emit("stateChange",{type:"cancelled",files:r,message:"删除附件成功"}),this.queue=this.queue.filter(i=>{var s;return((s=i==null?void 0:i.progress)==null?void 0:s.status)!==St.Queue})),this.queue.length&&(n.type="remove",this.queue.forEach(i=>{i.progress&&(i.progress.status=St.Remove)}),this.serverMethod({files:this.queue,event:n}));break}}setExtendServerConfig(n){this.extendServerConfig=n}serverMethod(n){let o;switch(n.event.type){case"upload":o=this.upload(n.files,n.event,a=>this.handleResultFromServer(a));break;case"removeAll":case"remove":o=this.remove(n.files,n.event,a=>this.handleResultFromServer(a));break;default:o=null}o&&o.then(a=>{this.handleResultFromServer(a)}).catch(a=>{this.handleResultFromServer(a)})}upload(n,o,a){return this.context.emit("stateChange",{type:"start",files:n}),this.uploadServerSer.upload(n,o,this.extendServerConfig,a)}remove(n,o,a){return this.uploadServerSer.remove(n,o,this.extendServerConfig,a)}reset(){this.queue=[]}destroyed(){this.reset()}}const cp=e.defineComponent({name:"FFileSelect",props:ON,emits:["change","stateChange"],setup(t,n){const o=new YN(n,t.uploadServerToken),a=e.getCurrentInstance(),r=e.ref("*");let i;const s=()=>{i.files&&(n.emit("change",i.files),o.handleFiles(i.files),i.value=null)};function l(){i.value=null,o.reset()}e.watch(()=>t.disabled,()=>{l()}),e.watch(()=>t.uploadedCount,f=>{o.setOptions({uploadedCount:f})}),e.watch(()=>t.extendConfig,f=>{o.setExtendServerConfig(f)});function p(f){f&&f.stopPropagation(),i.click()}function c(f){o.handleUploadEvent(f)}return e.onMounted(()=>{var f,u;i=(f=a==null?void 0:a.proxy)==null?void 0:f.$refs.uploadInput,l(),o.setOptions(t.options),o.setExtendServerConfig(t.extendConfig),r.value=(((u=t.options)==null?void 0:u.allowedContentTypes)||["*"]).join(",")}),e.onUnmounted(()=>{}),n.expose({handleUploadEvent:c}),()=>e.createVNode(e.Fragment,null,[e.createVNode("input",{ref:"uploadInput",type:"file",class:"ffileupload--browser",disabled:t.disabled,multiple:t.enableMulti,accept:r.value,onChange:()=>s(),style:"width: 10px",title:"uploadInput"},null),e.createVNode("div",{class:["upload-container",t.disabled?"f-state-disabled":""],onClick:f=>p(f),title:t.selectText},[e.createVNode("i",{class:"f-icon f-icon-upload upload-icon",style:"top: 2px;position: relative;"},null),t.selectText])])}}),ZN={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/uploader.schema.json",title:"uploader",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for uploader",type:"string"},type:{description:"The type string of uploader",type:"string",default:"uploader"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"boolean",default:!1},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},KN=new Map([["appearance",ge]]);function QN(t,n,o){return n}const XN={title:"uploader",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Oi={contentFill:{type:Boolean,default:!1},orderField:{type:String,default:"createTime"},previewColumns:{type:Array,default:[{field:"name",width:200,title:"文件名",checkbox:!0},{field:"size",width:100,title:"大小"},{field:"createTime",width:100,title:"日期"},{field:"state",width:100,title:"状态"},{field:"action",width:100,title:"操作"}]},previewVisible:{type:Boolean,default:!0},previewEnableMulti:{type:Boolean,default:!0},previewDefaultRename:{type:String,default:""},uploadDisabled:{type:Boolean,default:!1},uploadVisible:{type:Boolean,default:!0},uploadSelectText:{type:String,default:"选择文件"},uploadEnableMulti:{type:Boolean,default:!0},uploadedCount:{type:Number,default:0},disabled:{type:Boolean,default:!1},downloadButtonDisable:{type:Boolean,default:!1},previewButtonDisable:{type:Boolean,default:!1},deleteButtonDisable:{type:Boolean,default:!1},customInfo:{type:String,default:""},fileInfos:{type:Array,default:[]},uploadOptions:{type:Object,default:null},extendConfig:{type:Object,default:{}},uploadServerToken:{type:String,default:""},notifyServiceToken:{type:String,default:""}},dp=me(Oi,ZN,KN,QN,XN);function up(t,n,o){const a=lp.getNotify(t.notifyServiceToken),r=e.ref(t.fileInfos),{disabled:i,uploadVisible:s,uploadDisabled:l,previewVisible:p,orderField:c,previewEnableMulti:f,downloadButtonDisable:u,previewColumns:d,uploadEnableMulti:m,previewButtonDisable:g}=e.toRefs(t),h=e.ref(!1),y=e.ref([]),v=e.computed(()=>y.value.length),b=e.ref([]),x=e.ref(""),C=e.computed(()=>{(!r.value.length||y.value.length!==r.value.length)&&(h.value=!1);const _=r.value.map(H=>(H.hasOwnProperty("size")||(H.size=void 0),H.hasOwnProperty("createTime")||(H.createTime=void 0),H));if(_.sort(RN(c.value)),f.value){const H=_.map(L=>(L.checked=!!y.value.find(G=>G.id===L.id)||h.value,L));return y.value=[...H].filter(L=>L.checked),H}return _}),w=(_,H)=>{_.stopImmediatePropagation(),n.emit("fileDownloadEvent",{fileInfos:[H],name:""})},V=(_,H)=>{_.stopImmediatePropagation(),!g.value&&n.emit("filePreviewEvent",H)},N=(_,H)=>{H.checked&&(y.value=y.value.filter(L=>L.id!==H.id)),n.emit("fileRemoveEvent",H)},S=(_,H="preview")=>H==="preview"?["state","name","action","size","createTime"].findIndex(G=>G===_.field)>-1:H==="upload"?["state","name","size"].findIndex(G=>G===_.field)>-1:!1,D=_=>!(_.field==="state"&&(l.value||!s.value)),k=_=>_.lastIndexOf(".")>0?_.substring(0,_.lastIndexOf(".")):"",A=_=>{if(_.stopImmediatePropagation(),v.value>1){let H="";H=k(y.value[0].name),n.emit("fileDownloadEvent",{fileInfos:y.value,name:H})}},$=_=>{_.stopImmediatePropagation(),n.emit("fileRemoveEvent",y.value)},T=_=>{const H=C.value;_.checked?(H.forEach(L=>{L.checked=!0}),y.value=[...C.value],h.value=!0):(y.value=[],H.forEach(L=>{L.checked=!1}),h.value=!1),n.emit("previewMultiSelectedEvent",y.value)},E=(_,H)=>{_&&(_.stopImmediatePropagation(),_.stopPropagation()),(!x.value||H.id!==x.value)&&(x.value=H.id,n.emit("selectedEvent",H))},B=_=>{const H=y.value.findIndex(Y=>Y.id===_.id),L=H>-1,G=C.value.find(Y=>Y.id===_.id);G&&(G.checked=_.checked),_.checked&&!L&&G&&y.value.push(G),!_.checked&&L&&y.value.splice(H,1),C.value.length>0&&(y.value.length===C.value.length?h.value=!0:h.value=!1),E(null,G),n.emit("previewMultiSelectedEvent",y.value)},I=_=>{var H;(H=o==null?void 0:o.value)==null||H.handleUploadEvent(_)},F=_=>{I({type:"upload",file:_})},R=(_,H)=>{let L=[];_.files&&_.files.length>0?L=_.files:typeof _.file<"u"&&(L=[_.file]),H=H||_.type,L.map(G=>{const Y=b.value.findIndex(z=>{var q;return typeof G<"u"&&((q=z==null?void 0:z.file)==null?void 0:q.id)===G.id});Y>-1&&(b.value[Y]={type:H,file:G})})},O=_=>{if(_.files){const H=_.files.map(L=>L.id);b.value=b.value.filter(L=>!(H.findIndex(Y=>{var z;return Y===((z=L==null?void 0:L.file)==null?void 0:z.id)})>-1)),I({type:"hide",id:H.join(",")})}},W=_=>{let H="warning";(_.type==="cancelled"||_.type==="removed")&&(H="success");const L=_.hasOwnProperty("message")?_.message:"";a.show({options:{type:H,message:L},position:"top-center"})},M=_=>{if(_.type==="addedToQueue"&&typeof _.file<"u")b.value.push({type:_.type,file:_.file}),F(_.file);else if(_.type==="start")R(_,"start");else if(_.type==="done"){R(_,"done");const H=(_.files||[]).map(L=>({checked:!1,id:L.id,name:L.name,size:L.size,createTime:Mi(new Date,"yyyy-MM-dd HH:mm:ss")}));r.value=[...H,...C.value],O(_),n.emit("fUploadDoneEvent",jN(_.files||[]))}else _.type==="cancelled"||_.type==="removed"||_.type==="error"?(b.value=b.value.filter(H=>_.files&&_.files.findIndex(L=>{var G;return((G=H==null?void 0:H.file)==null?void 0:G.id)===L.id})<0),W(_)):_.type==="rejected"&&typeof _.file<"u"&&W(_)};return e.onUnmounted(()=>{}),{disabled:i,uploadVisible:s,uploadDisabled:l,downloadButtonDisable:u,previewVisible:p,previewColumns:d,uploadFiles:b,innerFileInfos:C,previewEnableMulti:f,previewMultiSelectedLength:v,previewSelectAllBtnChecked:h,uploadEnableMulti:m,previewCurrentId:x,multiFileRemoveHandler:$,previewMultiSelectChangeHandler:B,fileMultiDownloadHandler:A,selectOrCancelAllHandler:T,hasColumnHtmlFunc:S,showPreviewStateColumn:D,rowSelectedHandler:E,fileDownloadHandler:w,filePreviewHandler:V,fileRemoveHandler:N,handleStateChange:M}}const Pi=e.defineComponent({name:"FUploader",components:{"f-upload-progress":PN,"f-preview-checkbox":Jf,"f-file-select":cp},props:Oi,emits:["filePreviewEvent","fileDownloadEvent","previewMultiSelectedEvent","selectedEvent","fileRemoveEvent","fUploadDoneEvent","fUploadRemovedEvent"],setup(t,n){const o=e.ref(t.customInfo),a=op(t.uploadOptions,{allowedContentTypes:["*"],maxUploads:0,maxFileSize:"12MB"}),r=e.ref(null),{disabled:i,uploadVisible:s,uploadDisabled:l,downloadButtonDisable:p,previewVisible:c,previewColumns:f,uploadFiles:u,innerFileInfos:d,previewEnableMulti:m,previewMultiSelectedLength:g,previewSelectAllBtnChecked:h,uploadEnableMulti:y,previewCurrentId:v,multiFileRemoveHandler:b,previewMultiSelectChangeHandler:x,fileMultiDownloadHandler:C,selectOrCancelAllHandler:w,rowSelectedHandler:V,hasColumnHtmlFunc:N,showPreviewStateColumn:S,fileDownloadHandler:D,filePreviewHandler:k,fileRemoveHandler:A,handleStateChange:$}=up(t,n,r),T=e.computed(()=>d.value.length>0);function E(){var U;return tp((a==null?void 0:a.allowedContentTypes)||[])?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("支持类型:")]),e.createVNode("span",{class:"support-info--item-detail",style:"margin-right:4px;"},[(U=a.allowedContentTypes)==null?void 0:U.join(""),e.createTextVNode(",")])]):""}function B(){return np((a==null?void 0:a.maxFileSize)||"")?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("单个文件限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxFileSize,e.createTextVNode(", ")])]):""}function I(){return((a==null?void 0:a.maxUploads)||0)>0&&e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("文件总数限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxUploads,e.createTextVNode("个")])])}function F(){return s.value&&!l.value&&!i.value?e.createVNode("div",{class:"ffileupload--support-info"},[o.value?e.createVNode("ul",{class:"support-info--wrapper"},[e.createVNode("li",null,[e.createVNode("span",{class:"support-info--item-detail",innerHTML:o.value},null)])]):e.createVNode("ul",{class:"support-info--wrapper"},[E(),B(),I()])]):null}function R(U){var X,ie,de;return e.createVNode("div",{class:"uploadAndpreview--title-container"},[e.createVNode("div",{class:"ffilepreview--item-icon"},[e.createVNode("span",{class:["ffilepreview--filetype-icon",ap(((X=U.file)==null?void 0:X.name)||"")]},null)]),e.createVNode("div",{class:"uploadAndpreview--right"},[e.createVNode("a",{class:"item-content--title",title:(ie=U.file)==null?void 0:ie.name},[((de=U.file)==null?void 0:de.name)||"无名称"]),e.createVNode(e.resolveComponent("f-upload-progress"),{status:U.type==="done"?"success":"active",percent:rp(U),maxWidth:300},null)])])}function O(U){return e.createVNode("div",{class:"uploadAndpreview--title-container"},[e.createVNode("div",{class:"ffilepreview--item-icon"},[e.createVNode("span",{class:["ffilepreview--filetype-icon",ap(U.name)]},null)]),e.createVNode("div",{class:"uploadAndpreview--right"},[e.createVNode("a",{class:["item-content--title","previewButtonDisable.value?'no-preview':''"],title:U.name,onClick:X=>k(X,U)},[U.name])])])}function W(U,X,ie){return e.createVNode("div",{class:"uploadAndpreview--filesize-container"},[U==="preview"&&ie?e.createVNode("span",null,[LN(ie.size)]):null,U==="upload"&&X?e.createVNode("span",null,[rp(X)]):null])}function M(U,X){return e.createVNode("div",{class:"uploadAndpreview--state-container"},[U==="upload"?X&&X.type!=="done"?e.createVNode("p",{class:"upload-state--uploading"},[e.createVNode("i",{class:"f-icon f-icon-clock text-warning"},null),e.createVNode("span",null,[e.createTextVNode("正在上传...")])]):e.createVNode("p",{class:"upload-state--uploaded"},[e.createVNode("i",{class:"f-icon f-icon-success text-success"},null),e.createVNode("span",null,[e.createTextVNode("上传成功")])]):U==="preview"?e.createVNode("p",{class:"upload-state--uploaded"},[e.createVNode("i",{class:"f-icon f-icon-success text-success"},null),e.createVNode("span",null,[e.createTextVNode("已上传")])]):""])}function _(U){return e.createVNode("div",{class:"uploadAndpreview--action-container"},[p.value?"":e.createVNode("button",{class:"btn preview-btn",title:"下载",onClick:X=>D(X,U)},[e.createVNode("span",{class:"f-icon f-icon-enclosure_download"},null)]),t.previewButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"预览",onClick:X=>k(X,U)},[e.createVNode("span",{class:"f-icon f-icon-enclosure_browse"},null)]),t.deleteButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"删除",onClick:X=>A(X,U)},[e.createVNode("span",{class:"f-icon f-icon-enclosure_delete",style:"top: -1px"},null)])])}function H(U){return e.createVNode("div",{class:"uploadAndpreview--date-container"},[U.createTime||""])}function L(U,X,ie,de){let ne;if(U=U||"preview",U==="preview"&&ie)switch(de.field){case"state":ne=M("preview",null);break;case"name":ne=O(ie);break;case"action":ne=_(ie);break;case"size":ne=W(U,X,ie);break;case"createTime":ne=H(ie);break;default:ne=`<div>${ie[de.field]||""} </div>`}if(U==="upload"&&X)switch(de.field){case"state":ne=M("upload",X);break;case"name":ne=R(X);break;case"size":ne=W(U,X,ie);break;default:ne=""}return ne}function G(){return s.value?e.createVNode("div",{class:"header--left-container"},[e.createVNode(e.resolveComponent("f-file-select"),{ref:r,disabled:l.value,selectText:t.selectText,uploadedCount:t.uploadedCount,uploadServerToken:t.uploadServerToken,enableMulti:y.value,options:t.uploadOptions,extendConfig:t.extendConfig,onStateChange:U=>$(U)},null)]):null}function Y(){return!s.value&&c.value&&T.value?e.createVNode("div",{class:"header--left-container header--countInfo"},[e.createVNode("p",{class:"m-0"},[e.createTextVNode("共"),e.createVNode("span",{class:"count"},[u.value.length+d.value.length]),e.createTextVNode("个附件"),g.value>0?e.createVNode(e.Fragment,null,[e.createTextVNode("(已选"),e.createVNode("span",{class:"count-selected"},[g.value]),e.createTextVNode("个)")]):""])]):null}function z(){return(!p.value||!t.deleteButtonDisable)&&c.value&&T.value?e.createVNode("div",{class:"header--right-container"},[p.value?null:e.createVNode("button",{class:"btn btn-primary f-btn-ml",disabled:g.value===0,onClick:ie=>C(ie)},[e.createTextVNode("下载")]),t.deleteButtonDisable.value?null:e.createVNode("button",{class:"btn btn-secondary f-btn-ml",disabled:g.value===0,onClick:ie=>b(ie)},[e.createTextVNode("删除")])]):null}function q(){return f.value.map(U=>S(U)?e.createVNode("th",{style:{width:U.width?U.width+"px":"auto"},class:[!i.value&&U.checkbox&&U.checkbox?"td--hascheckbox":""]},[!i.value&&m.value&&U.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{class:"preview-checkbox",id:"previewMultiBtn",checked:h.value,onCheckedChange:X=>w(X)},null):null,U.title]):null)}function j(){return u.value.map(U=>{var X;return e.createVNode("tr",{class:"uploadAndpreview--upload-item",id:"uploadAndpreview--upload-item"+(((X=U==null?void 0:U.file)==null?void 0:X.id)||"")},[f.value.map(ie=>{var de;return e.createVNode("td",{class:[!i.value&&ie.checkbox&&ie.checkbox?"td--hascheckbox":""]},[m.value&&ie.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{id:(de=U==null?void 0:U.file)==null?void 0:de.id,checked:U.checked,disabled:U.type!=="done",class:"preview-checkbox",onCheckedChange:ne=>x(ne)},null):null,N(ie,"upload")?L("upload",U,null,ie):null])})])})}function Z(){return d.value.map(U=>e.createVNode("tr",{class:["uploadAndpreview--preview-item",v.value===U.id?"uploadAndpreview--currentfile":""],id:"uploadAndpreview--preview-item"+U.id,onClick:X=>V(X,U)},[f.value.map(X=>S(X)?e.createVNode("td",{class:[!i.value&&X.checkbox&&X.checkbox?"td--hascheckbox":""]},[!i.value&&m.value&&X.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{id:U.id,checked:U.checked,class:"preview-checkbox",onCheckedChange:ie=>x(ie)},null):null,N(X,"preview")?L("preview",null,U,X):e.createVNode("div",{class:"text-truncate",innerHTML:L("preview",null,U,X)},null)]):null)]))}return()=>i.value?e.createVNode("div",{class:"fv-upload-and-preview"},[T.value?null:F(),c.value?e.createVNode("div",{class:"uploadAndpreview--content"},[T.value?e.createVNode("table",{class:"table table-bordered uploadAndpreview--table"},[e.createVNode("thead",null,[q()]),e.createVNode("tbody",null,[Z()])]):e.createVNode("p",{class:"uploadAndpreview--nodata"},[e.createTextVNode("无附件信息")])]):null,T.value?F():null]):e.createVNode("div",{class:"fv-upload-and-preview"},[e.createVNode("div",{class:"uploadAndpreview--header"},[G(),Y(),z()]),T.value?null:F(),c.value||s.value?e.createVNode("div",{class:"uploadAndpreview--content"},[(p.value||!s.value)&&u.value.length===0&&!T.value?e.createVNode("p",{class:"uploadAndpreview--nodata"},[e.createTextVNode("无附件信息")]):"",u.value.length>0||T?e.createVNode("table",{class:"table table-bordered uploadAndpreview--table"},[e.createVNode("thead",null,[q()]),e.createVNode("tbody",null,[j(),Z()])]):null]):null,T.value?F():null])}}),JN=e.defineComponent({name:"FUploaderDesign",components:{"f-preview-checkbox":Jf,"f-file-select":cp},props:Oi,emits:["filePreviewEvent","fileDownloadEvent","fPreviewMultiSelectedEvent","fSelectedEvent","fileRemoveEvent","fUploadDoneEvent","fUploadRemovedEvent"],setup(t,n){const o=e.ref(t.customInfo),a=op(t.uploadOptions,{allowedContentTypes:["*"],maxUploads:0,maxFileSize:"12MB"}),r=e.ref(null),i=[{id:"attach01",name:""},{id:"attach02",name:""}],{disabled:s,uploadVisible:l,uploadDisabled:p,downloadButtonDisable:c,previewVisible:f,previewColumns:u,previewEnableMulti:d,previewCurrentId:m,showPreviewStateColumn:g}=up(t,n,r);function h(){var I;return tp((a==null?void 0:a.allowedContentTypes)||[])?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("支持类型:")]),e.createVNode("span",{class:"support-info--item-detail",style:"margin-right:4px;"},[(I=a.allowedContentTypes)==null?void 0:I.join(""),e.createTextVNode(",")])]):null}function y(){return np((a==null?void 0:a.maxFileSize)||"")?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("单个文件限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxFileSize,e.createTextVNode(", ")])]):null}function v(){return((a==null?void 0:a.maxUploads)||0)>0?e.createVNode("li",null,[e.createVNode("span",null,[e.createTextVNode("文件总数限制:")]),e.createVNode("span",{class:"support-info--item-detail"},[a.maxUploads,e.createTextVNode("个")])]):null}function b(){return l.value&&!p.value&&!s.value?e.createVNode("div",{class:"ffileupload--support-info"},[o.value?e.createVNode("ul",{class:"support-info--wrapper"},[e.createVNode("li",null,[e.createVNode("span",{class:"support-info--item-detail",innerHTML:o.value},null)])]):e.createVNode("ul",{class:"support-info--wrapper"},[h(),y(),v()])]):null}function x(I){return e.createVNode("div",{class:"uploadAndpreview--title-container"},[e.createVNode("div",{class:"ffilepreview--item-icon"},[e.createVNode("span",{class:"ffilepreview--filetype-icon"},null)]),e.createVNode("div",{class:"uploadAndpreview--right"},[e.createVNode("span",{class:"ffilepreview--preview-block"},null)])])}function C(I){return e.createVNode("div",{class:"uploadAndpreview--filesize-container"},[e.createVNode("span",{class:"ffilepreview--preview-block"},null)])}function w(){return e.createVNode("div",{class:"uploadAndpreview--state-container"},[e.createVNode("p",{class:"upload-state--uploaded"},[e.createVNode("i",{class:"f-icon f-icon-success text-success"},null),e.createVNode("span",null,[e.createTextVNode("已上传")])])])}function V(I){return e.createVNode("div",{class:"uploadAndpreview--action-container"},[c.value?"":e.createVNode("button",{class:"btn preview-btn",title:"下载"},[e.createVNode("span",{class:"f-icon f-icon-enclosure_download"},null)]),t.previewButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"预览"},[e.createVNode("span",{class:"f-icon f-icon-enclosure_browse"},null)]),t.deleteButtonDisable?"":e.createVNode("button",{class:"btn preview-btn",title:"删除"},[e.createVNode("span",{class:"f-icon f-icon-enclosure_delete",style:"top: -1px"},null)])])}function N(I){return e.createVNode("div",{class:"uploadAndpreview--date-container"},[e.createTextVNode(" "),e.createVNode("span",{class:"ffilepreview--preview-block"},null)])}function S(I,F,R){let O=null;if(I=I||"preview",I==="preview"&&F)switch(R.field){case"state":O=w();break;case"name":O=x();break;case"action":O=V();break;case"size":O=C();break;case"createTime":O=N();break;default:O=e.createVNode("span",{class:"ffilepreview--preview-block"},null)}return O}function D(){return l.value?e.createVNode("div",{class:"header--left-container"},[e.createVNode(e.resolveComponent("f-file-select"),{ref:r,disabled:p.value,selectText:t.selectText},null)]):null}function k(){return(!c.value||!t.deleteButtonDisable)&&f.value?e.createVNode("div",{class:"header--right-container"},[c.value?null:e.createVNode("button",{class:"btn btn-primary f-btn-ml",disabled:!0},[e.createTextVNode("下载")]),t.deleteButtonDisable.value?null:e.createVNode("button",{class:"btn btn-secondary f-btn-ml",disabled:!0},[e.createTextVNode("删除")])]):null}function A(){return u.value.map(I=>g(I)?e.createVNode("th",{style:{width:I.width?I.width+"px":"auto"},class:[!s.value&&I.checkbox&&I.checkbox?"td--hascheckbox":""]},[!s.value&&d.value&&I.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{class:"preview-checkbox",id:"previewMultiBtn"},null):null,I.title]):null)}function $(){return i.map(I=>e.createVNode("tr",{class:["uploadAndpreview--preview-item",m.value===I.id?"uploadAndpreview--currentfile":""],id:"uploadAndpreview--preview-item"+I.id},[u.value.map(F=>g(F)?e.createVNode("td",{class:[!s.value&&F.checkbox&&F.checkbox?"td--hascheckbox":""]},[!s.value&&d.value&&F.checkbox?e.createVNode(e.resolveComponent("f-preview-checkbox"),{class:"preview-checkbox"},null):null,S("preview",I,F)]):null)]))}e.onBeforeMount(()=>{});const T=e.ref(),E=e.inject("design-item-context"),B=ye(T,E);return e.onMounted(()=>{T.value.componentInstance=B}),n.expose(B.value),()=>e.createVNode("div",{class:"fv-upload-and-preview",ref:T},[f.value||l.value?e.createVNode(e.Fragment,null,[s.value?null:e.createVNode("div",{class:"uploadAndpreview--header"},[D(),k()]),e.createVNode("div",{class:"uploadAndpreview--content"},[e.createVNode("table",{class:"table table-bordered uploadAndpreview--table"},[e.createVNode("thead",null,[A()]),e.createVNode("tbody",null,[$()])])]),b()]):null])}}),fp={install(t){t.component(Pi.name,Pi)},register(t,n,o){t.uploader=Pi,n.uploader=dp},registerDesigner(t,n,o){t.uploader=JN,n.uploader=dp}},eS=new Map([["appearance",ge]]);function tS(t,n,o){return n}const nS={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/verify-detail.schema.json",title:"verify-detail",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for verify-detail",type:"string"},type:{description:"The type string of verify-detail",type:"string",default:"verify-detail"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},oS={title:"verify-detail",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},_i={showType:{type:String,default:""},showList:{type:Boolean,default:!1},verifyList:{type:Array,default:[{id:"111",title:"单据信息[销售组织]",msg:"字段值不能为空",type:"empty"},{id:"222",title:"单据信息[销售组织]",msg:"字段值不能为空",type:"empty"}]},verifyType:{type:Array,default:[{id:"vertifyType1",type:"all",title:"全部"},{id:"vertifyType3",type:"empty",title:"值为空"}]},customClass:{type:String,default:""},maxHeight:{type:Number,default:200}},pp=me(_i,nS,eS,tS,oS),Go=e.defineComponent({name:"FVerifyDetail",props:_i,emits:["validatorClick","listshow"],setup(t,n){let o=[];const a=e.ref(t.showList),r=e.ref(t.maxHeight),i=e.ref(t.verifyList),s=e.ref(t.showType),l=e.ref(t.verifyType),p=e.ref(t.customClass);function c(){a.value=!a.value,n.emit("listshow",a.value)}function f(V){var N;!V&&l.value&&l.value.length>0&&(V=l.value[0].type),(N=l.value)==null||N.forEach(S=>{S.active=S.type===V})}function u(V){V=V||o[0].type,o.forEach(N=>{N.show=N.type===V})}function d(V){V.length<=0||(f(V.type),u(V.type))}function m(){a.value=!1,n.emit("listshow",!1)}function g(V){n.emit("validatorClick",V)}function h(V){return e.createVNode("li",{class:"f-verify-list",onClick:()=>g(V)},[e.createVNode("span",{class:["f-icon f-icon-close-outline list-icon list-error",{"list-warning":V.type==="warn"}]},null),e.createVNode("div",{class:"list-con"},[e.createVNode("p",{class:"list-title",title:V.title},[V.title]),e.createVNode("p",{class:"list-msg",title:V.msg},[V.msg])])])}function y(){return o.map(V=>e.createVNode("ul",{class:["f-verify-list-content",{active:V.show}]},[V.list&&V.list.map(N=>h(N))]))}const v=e.computed(()=>{var V;return((V=i.value)==null?void 0:V.length)>0});function b(V){return{btn:!0,"verify-title-btn":!0,"f-state-selected":V.active,disabled:V.length<=0}}const x=e.computed(()=>{var V;return(V=l.value)==null?void 0:V.map(N=>e.createVNode("button",{class:b(N),onClick:()=>d(N)},[N.title,e.createVNode("span",null,[N.length])]))}),C=e.computed(()=>{var V;return e.createVNode("div",{class:"f-verify-nums",onClick:c},[e.createVNode("span",{class:"nums-icon f-icon f-icon-warning"},null),e.createVNode("span",{class:"nums-count"},[(V=i.value)==null?void 0:V.length])])});function w(){var N;const V=[];l.value&&((N=l.value)!=null&&N.length)&&(l.value.map(S=>{const D={list:S.type==="all"?i.value:[],show:!1,type:S.type};V.push(D)}),V.map((S,D)=>{const k=i.value.filter(A=>A.type===S.type);V[D].list=D!==0?k:V[D].list}),l.value.map((S,D)=>{S.length=V[D].list.length})),o=V}return e.onBeforeMount(()=>{w(),u(s.value),f(s.value)}),()=>e.createVNode("div",{class:v?`f-verify-detail ${p.value}`:""},[v.value?e.createVNode("div",{class:"f-verify-detail-content"},[C.value,e.createVNode("div",{class:"f-verify-form-main",hidden:!a.value},[e.createVNode("div",{class:"f-verify-form-content"},[e.createVNode("div",{class:"f-verify-form-content-arrow"},null),e.createVNode("div",{class:"f-verify-form-content-list"},[e.createVNode("div",{class:"f-verify-forms-title"},[e.createVNode("div",{class:"btn-group"},[x.value]),e.createVNode("div",{class:"f-verify-close",onClick:m},[e.createVNode("span",{class:"f-icon f-icon-close"},null)])]),e.createVNode("div",{class:"f-verify-forms-list",style:{maxHeight:r.value+"px"}},[y()])])])])]):null])}});function aS(t,n,o){e.createApp({setup(){return e.onUnmounted(()=>{n&&n()}),()=>e.createVNode(Go,t,null)}}).mount(o)}class mp{static show(n,o){this.clear();let a=0;this.verifyContainer=document.createElement("div"),o?(a=o.offsetHeight-110,o.appendChild(this.verifyContainer)):(a=document.documentElement.clientHeight-110,document.body.appendChild(this.verifyContainer)),n.maxHeight=n.maxHeight?n.maxHeight:a,aS(n,this.clear,this.verifyContainer)}static clear(){let n=this.verifyContainer;n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}P(mp,"verifyContainer",null);const rS=e.defineComponent({name:"FVerifyDetailDesign",props:_i,emits:["validatorClick","listshow"],setup(t,n){let o=[];const a=e.ref(t.showList),r=e.ref(t.maxHeight),i=e.ref(t.verifyList),s=e.ref(t.showType),l=e.ref(t.verifyType),p=e.ref(),c=e.inject("design-item-context"),f=ye(p,c);e.onMounted(()=>{p.value.componentInstance=f}),n.expose(f.value);function u(){a.value=!a.value,n.emit("listshow",a.value)}function d(S){var D;(D=l.value)==null||D.forEach(k=>{k.active=k.type===S})}function m(S){o.forEach(D=>{D.show=D.type===S})}function g(S){S.length<=0||(d(S.type),m(S.type))}function h(){a.value=!1,n.emit("listshow",!1)}function y(S){n.emit("validatorClick",S)}function v(S){return e.createVNode("li",{class:"f-verify-list",onClick:()=>y(S)},[e.createVNode("span",{class:["f-icon f-icon-close-outline list-icon list-error",{"list-warning":S.type==="warn"}]},null),e.createVNode("div",{class:"list-con"},[e.createVNode("p",{class:"list-title",title:S.title},[S.title]),e.createVNode("p",{class:"list-msg",title:S.msg},[S.msg])])])}function b(){return o.map(S=>e.createVNode("ul",{class:["f-verify-list-content",{active:S.show}]},[S.list&&S.list.map(D=>v(D))]))}const x=e.computed(()=>{var S;return((S=i.value)==null?void 0:S.length)>0});function C(S){return{"btn btn-secondary":!0,active:S.active,disabled:S.length<=0}}const w=e.computed(()=>{var S;return(S=l.value)==null?void 0:S.map(D=>e.createVNode("button",{class:C(D),onClick:()=>g(D)},[D.title,e.createVNode("span",null,[D.length])]))}),V=e.computed(()=>{var S;return e.createVNode("div",{class:"f-verify-nums",onClick:u},[e.createVNode("span",{class:"nums-icon f-icon f-icon-warning"},null),e.createVNode("span",{class:"nums-count"},[(S=i.value)==null?void 0:S.length])])});function N(){var D;const S=[];l.value&&((D=l.value)!=null&&D.length)&&(l.value.map(k=>{const A={list:k.type==="all"?i.value:[],show:!1,type:k.type};S.push(A)}),S.map((k,A)=>{const $=i.value.filter(T=>T.type===k.type);S[A].list=A!==0?$:S[A].list}),l.value.map((k,A)=>{k.length=S[A].list.length})),o=S}return e.onBeforeMount(()=>{N(),m(s.value),d(s.value)}),()=>e.createVNode("div",{ref:p},[x.value?e.createVNode("div",{class:"f-verify-detail"},[e.createVNode("div",{class:"f-verify-detail-content"},[V.value,e.createVNode("div",{class:"f-verify-form-main",hidden:!a.value},[e.createVNode("div",{class:"f-verify-form-content"},[e.createVNode("div",{class:"f-verify-form-content-arrow"},null),e.createVNode("div",{class:"f-verify-form-content-list"},[e.createVNode("div",{class:"f-verify-forms-title"},[e.createVNode("div",{class:"btn-group"},[w.value]),e.createVNode("div",{class:"f-verify-close",onClick:h},[e.createVNode("span",{class:"f-icon f-icon-close"},null)])]),e.createVNode("div",{class:"f-verify-forms-list",style:{maxHeight:r.value+"px"}},[b()])])])])])]):null])}}),hp={install(t){t.component(Go.name,Go),t.provide("FVerifyDetailService",mp)},register(t,n,o){t["verify-detail"]=Go,n["verify-detail"]=pp},registerDesigner(t,n,o){t["verify-detail"]=rS,n["verify-detail"]=pp}},iS=new Map([["appearance",ge]]);function sS(t,n,o){return n}const lS={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/weather.schema.json",title:"weather",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a weather",type:"string"},type:{description:"The type string of weather component",type:"string",default:"weather"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}}},required:["id","type"]},cS={title:"weather",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},dS={cityItems:{type:Array,default:[{province:"北京",city:["北京"]},{province:"山东",city:["济南","青岛"]},{province:"黑龙江",city:["牡丹江","齐齐哈尔"]}]},themeItems:{type:Array,default:[{title:"school",adviceItems:["clothes","sports","sunscreen"]},{title:"office",adviceItems:["clothes","traffic","umbrella"]},{title:"construction",adviceItems:["clothes","chill","heatstroke"]},{title:"tourism",adviceItems:["clothes","sunscreen","tourism"]}]},data:{type:Object,default:{sunriseTime:e.ref(new Date),sunsetTime:e.ref(new Date),temperature:e.ref(0),max:e.ref(0),min:e.ref(0),weather:e.ref("阴"),air:e.ref(0),adviceItems:[{key:"clothes",value:{name:"穿衣",info:"毛衣",detail:"建议穿长袖毛衣等服装。"}},{key:"sports",value:{name:"运动",info:"适宜",detail:"各项气象条件都很好,很适合户外运动。"}},{key:"sunscreen",value:{name:"防晒",info:"强",detail:"建议涂抹SPF在15-20之间,PA++的防晒护肤品。"}},{key:"traffic",value:{name:"交通",info:"良好",detail:"天气较好,路面干燥,交通气象条件良好,车辆可以正常行驶。"}},{key:"umbrella",value:{name:"雨伞",info:"不带伞",detail:"天气较好,您在出门的时候无须带雨伞。"}},{key:"chill",value:{name:"风寒",info:"无",detail:"温度未达到风寒所需的低温,稍作防寒准备即可。"}},{key:"heatstroke",value:{name:"中暑",info:"无中暑风险",detail:"天气不热,在炎炎夏日中十分难得,可以告别暑气漫漫啦~"}},{key:"tourism",value:{name:"旅游",info:"适宜",detail:"天气较好,温度适宜,是个好天气哦。这样的天气适宜旅游,您可以尽情地享受大自然的风光。"}}],proindexItemsSet:[[{title:"紫外线",icon:"UV",value:"中等",info:"16:00前注意防晒",explain:"紫外线指数(UVI)测量紫外线辐射。UVI越高,潜在伤害就越大,造成伤害的速度也越快。"},{title:"降水量",icon:"rainfall",value:"0mm",info:"过去24小时",explain:"降水量,是指12或24小时内降雨(雪)量的总和。"}],[{title:"湿度",icon:"humidity",value:"31%",info:"露点温度为4°",explain:"空气中含水量与空气可容纳水量的比值。气温越高,空气可容纳的水量就越多。湿度高意味着可能结露或起雾。"},{title:"体感温度",icon:"apparentTemp",value:"14°",info:"风较大,体感更凉",explain:"体感温度传达身体感觉有多暖或多冷,可能与实际温度不同。体感温度受湿度和风影响。"}],[{title:"气压",icon:"pressure",value:"1010mpa",info:"当前气压较稳定",explain:"气压的显著急剧变化用于预测天气变化。例如,气压降低表示雨雪即将来临,升高则表示天气将好转。"},{title:"能见度",icon:"visibility",value:"19km",info:"目前非常好",explain:"能见度会告诉你可以清晰地看到多远以外的物体。能见度测量大气透明度,不考虑光照强度或障碍物。"}]],dayItemsSet:[[{icon:"sunny",temp:15},{icon:"sunny",temp:16},{icon:"sunny",temp:20},{icon:"sunny",temp:22},{icon:"sunny",temp:24},{icon:"cloudy",temp:23},{icon:"cloudy",temp:20},{icon:"cloudy",temp:19},{icon:"cloudy",temp:19},{icon:"cloudy",temp:18},{icon:"rainy1",temp:18},{icon:"rainy1",temp:17},{icon:"rainy1",temp:15},{icon:"rainy1",temp:15},{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:18},{icon:"sunny",temp:19},{icon:"sunny",temp:19},{icon:"sunny",temp:20},{icon:"sunny",temp:20}],[{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"rainy2",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:15},{icon:"sunny",temp:18},{icon:"sunny",temp:19},{icon:"sunny",temp:19},{icon:"sunny",temp:20},{icon:"sunny",temp:20},{icon:"rainy2",temp:21},{icon:"rainy2",temp:21},{icon:"rainy2",temp:21},{icon:"sunny",temp:21},{icon:"sunny",temp:22},{icon:"sunny",temp:24},{icon:"sunny",temp:24},{icon:"sunny",temp:23},{icon:"sunny",temp:20},{icon:"sunny",temp:20},{icon:"sunny",temp:19},{icon:"sunny",temp:19},{icon:"sunny",temp:15},{icon:"sunny",temp:15}]],weekItems:[{icon:"rainy1",max:24,min:15},{icon:"rainy2",max:24,min:15},{icon:"foggy",max:26,min:11},{icon:"cloudy",max:22,min:7},{icon:"snowy1",max:10,min:3},{icon:"sunny",max:19,min:5},{icon:"snowy2",max:10,min:4}]}}},Ri={data:{type:Object,default:dS},theme:{type:Number,default:1}},gp=me(Ri,lS,iS,sS,cS);function yp(t,n){function o(a){return a<10?"0"+a:a}return{addZero:o}}function Uo(t,n){const o=e.ref(t.data.data);return{colorTheme:e.computed(()=>new Date().getTime()-o.value.default.sunriseTime.getTime()<0||o.value.default.sunsetTime.getTime()-new Date().getTime()<0?["#151276","#7939e0","#332396","#814ca7"]:new Date().getTime()-o.value.default.sunriseTime.getTime()<36e5?["#49417b","#f1b655","#b1785b","#d99877"]:o.value.default.sunsetTime.getTime()-new Date().getTime()<36e5?["#9e2e2e","#f59b0b","#c15334","#ff7361"]:["#0273D7","#76BAFF","#388FFF","#75C6FE"])}}function Li(t,n){const o=e.ref(t.data.data),a=Uo(t);function r(){let c=nn.getInstanceByDom(document.getElementById("sunset"));c||(c=nn.init(document.getElementById("sunset"),null,{height:170,width:380})),c.setOption({series:[{data:[{value:new Date().getTime()-o.value.default.sunriseTime.getTime(),itemStyle:{borderRadius:10,color:{type:"linear",x:1,y:0,x2:0,y2:0,colorStops:[{offset:1,color:a.colorTheme.value?a.colorTheme.value[3]:"white"},{offset:0,color:"white"}]}}},{value:o.value.default.sunsetTime.getTime()-new Date().getTime(),itemStyle:{opacity:0}}],type:"pie",center:["50%","100%"],radius:["200%","190%"],startAngle:180,endAngle:360,label:{show:!1},emphasis:{scale:!1},emptyCircleStyle:{borderType:"dashed"}},{type:"gauge",center:["50%","100%"],radius:"220%",startAngle:180,endAngle:360,axisTick:{show:!1},axisLabel:{show:!1},axisLine:{show:!1},splitNumber:20,splitLine:{length:3,lineStyle:{width:10,color:"white"}}}]})}function i(c){let f=nn.getInstanceByDom(document.getElementById("chart24h"));f||(f=nn.init(document.getElementById("chart24h"),null,{width:1885,height:75})),f.setOption({xAxis:{type:"category",show:!1},yAxis:{type:"value",show:!1},series:[{data:o.value.default.dayItemsSet[c].map(u=>u.temp),type:"line",itemStyle:{color:"white"}}]})}function s(){const c=document.getElementById("background");if(c){const f=c.getBoundingClientRect().width,u=Math.max(f,400)*1.11;let d=nn.getInstanceByDom(document.getElementById("chart7d"));d?d.resize({width:u,height:90}):d=nn.init(document.getElementById("chart7d"),null,{width:u,height:90}),d.setOption({grid:{left:0},xAxis:{type:"category",show:!1},yAxis:{type:"value",show:!1},series:[{data:o.value.default.weekItems.map(m=>m.min),type:"line",itemStyle:{color:"#5C90F9"}},{data:o.value.default.weekItems.map(m=>m.max),type:"line",itemStyle:{color:"#FC9657"}}]})}}function l(){const c=document.getElementById("airPoint"),f=document.getElementById("background");c&&f&&(c.style.marginLeft=o.value.default.air/500*(f.getBoundingClientRect().width-50)-5+"px")}function p(c){r(),i(c),s(),l()}return{renderChart24h:i,renderChart7d:s,renderCharts:p}}function uS(t,n){const o=e.ref(),a=e.ref(t.data.data),r=e.ref(0),i=yp(),s=Li(t);function l(y){r.value=y}function p(y){switch(y){case 0:return"今天";case 1:return"明天";default:const v=new Date(new Date().getTime()+24*60*60*1e3*y).getDay(),b="周";switch(v){case 0:return b+"日";case 1:return b+"一";case 2:return b+"二";case 3:return b+"三";case 4:return b+"四";case 5:return b+"五";case 6:return b+"六"}break}}function c(y){const v=new Date(new Date().getTime()+864e5*y);return i.addZero(v.getMonth()+1)+"/"+i.addZero(v.getDate())}function f(){const v=o.value.getBoundingClientRect().width-120,b=document.getElementById("f-weather-24h-content");b&&(b.offsetLeft+v>-32?b.style.marginLeft="-32px":b.style.marginLeft=b.offsetLeft+v+"px")}function u(){const y=o.value.getBoundingClientRect().width,v=y-120,b=document.getElementById("f-weather-24h-content");if(b){const x=b.scrollWidth-y-130;b.offsetLeft-v<-x?b.style.marginLeft="-"+x+"px":b.style.marginLeft=b.offsetLeft-v+"px"}}function d(y,v){if(y===0){const b=new Date;return v===0?"现在":i.addZero((b.getHours()+v)%24)}else return i.addZero(v)}e.watch(r,()=>{const y=document.getElementById("f-weather-24h-content");y.style.marginLeft="-32px",s.renderChart24h(r.value)});function m(){return e.createVNode("div",{class:"f-weather-24h-container"},[e.createVNode("div",{class:"f-weather-24h-title"},[e.createTextVNode("24小时天气预报")]),e.createVNode("div",{class:"f-weather-lrbutton-container"},[e.createVNode("img",{src:"/components/weather/src/image/arrow-left.png",class:"f-weather-lrbutton-l",onClick:f},null),e.createVNode("img",{src:"/components/weather/src/image/arrow-right.png",class:"f-weather-lrbutton-r",onClick:u},null)]),e.createVNode("div",{class:"f-weather-24h-content-scroll"},[e.createVNode("div",{id:"f-weather-24h-content"},[a.value.default.dayItemsSet.map((y,v)=>v===r.value?e.createVNode("div",null,[e.createVNode("tr",{id:"report"+v,class:"f-weather-24h-tr"},[y.map((b,x)=>e.createVNode("td",{class:"f-weather-24h-td"},[e.createVNode("div",null,[d(v,x)]),e.createVNode("img",{src:"http://mat1.gtimg.com/pingjs/ext2020/weather/pc/icon/weather/day/"+b.icon+".png",class:"f-weather-24h-img"},null),e.createVNode("div",null,[b.temp+"°"])]))])]):""),e.createVNode("div",{id:"chart24h",class:"f-weather-chart24h"},null)])])])}function g(){return e.createVNode("div",{class:"f-weather-7d-container"},[e.createVNode("div",{class:"f-weather-7d-title"},[e.createTextVNode("七日天气预报")]),e.createVNode("tr",{class:"f-weather-7d-tr"},[a.value.default.weekItems.map((y,v)=>e.createVNode("td",{id:"day"+v,class:"f-weather-7d-td",style:"background-color: "+(v===r.value?"rgba(0, 0, 0, 0.05)":"none"),onClick:()=>l(v)},[e.createVNode("div",{class:"f-weather-7d-td-title"},[p(v)]),e.createVNode("div",{class:"f-weather-7d-td-date"},[c(v)]),e.createVNode("img",{src:"http://mat1.gtimg.com/pingjs/ext2020/weather/pc/icon/weather/day/"+y.icon+".png",class:"f-weather-7d-td-img"},null),e.createVNode("div",{class:"f-weather-7d-td-margin"},[y.max+"°"]),e.createVNode("div",null,[y.min+"°"])]))]),e.createVNode("div",{id:"chart7d",class:"f-weather-chart7d"},null)])}function h(){return e.createVNode("div",{ref:o},[m(),g()])}return{renderWeatherReport:h}}function fS(t,n){const o=e.ref(t.data.data);function a(){return e.createVNode("div",null,[o.value.default.proindexItemsSet.map(r=>e.createVNode("tr",{class:"f-weather-proindex-tr"},[r.map(i=>e.createVNode("td",{class:"f-weather-proindex-td"},[e.createVNode("div",{class:"f-weather-proindex-content-scroll"},[e.createVNode("div",{class:"f-weather-proindex-content"},[e.createVNode("img",{src:"/components/weather/src/image/proindexImage/"+i.icon+".png",class:"f-weather-proindex-icon"},null),e.createVNode("div",{class:"f-weather-proindex-text"},[e.createVNode("div",{class:"f-weather-proindex-title"},[i.title]),e.createVNode("div",{class:"f-weather-proindex-value"},[i.value])]),e.createVNode("div",{class:"f-weather-proindex-line"},null),e.createVNode("br",null,null),e.createVNode("div",{class:"f-weather-proindex-info"},[i.info]),e.createVNode("br",null,null),e.createVNode("div",null,[i.explain])])])]))]))])}return{renderWeatherProindex:a}}function pS(t,n){const o=e.ref(!0),a=Uo(t),{renderWeatherReport:r}=uS(t),{renderWeatherProindex:i}=fS(t),s=e.computed(()=>({"background-color":o.value?a.colorTheme.value[2]:"",color:o.value?"white":""})),l=e.computed(()=>({"background-color":o.value?"":a.colorTheme.value[2],color:o.value?"":"white"})),p=e.computed(()=>({display:o.value?"block":"none"})),c=e.computed(()=>({display:o.value?"none":"block"}));function f(){o.value=!0}function u(){o.value=!1}function d(){return e.createVNode("div",{class:"f-weather-container f-weather-detail"},[e.createVNode("div",{style:"display:flex"},[e.createVNode("button",{class:"f-weather-button f-weather-button-report",style:s.value,onClick:f},[e.createTextVNode("天气预报")]),e.createVNode("button",{class:"f-weather-button f-weather-button-proindex",style:l.value,onClick:u},[e.createTextVNode("其它参数")])]),e.createVNode("div",{style:p.value},[r()]),e.createVNode("div",{style:c.value},[i()])])}return{renderWeatherDetail:d}}var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function mS(t){if(t.__esModule)return t;var n=t.default;if(typeof n=="function"){var o=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};o.prototype=n.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,r.get?r:{enumerable:!0,get:function(){return t[a]}})}),o}var Hi={exports:{}},ji={exports:{}},Ln=1e3,Hn=Ln*60,jn=Hn*60,Wn=jn*24,hS=Wn*365.25,gS=function(t,n){n=n||{};var o=typeof t;if(o==="string"&&t.length>0)return yS(t);if(o==="number"&&isNaN(t)===!1)return n.long?vS(t):bS(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function yS(t){if(t=String(t),!(t.length>100)){var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(n){var o=parseFloat(n[1]),a=(n[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return o*hS;case"days":case"day":case"d":return o*Wn;case"hours":case"hour":case"hrs":case"hr":case"h":return o*jn;case"minutes":case"minute":case"mins":case"min":case"m":return o*Hn;case"seconds":case"second":case"secs":case"sec":case"s":return o*Ln;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function bS(t){return t>=Wn?Math.round(t/Wn)+"d":t>=jn?Math.round(t/jn)+"h":t>=Hn?Math.round(t/Hn)+"m":t>=Ln?Math.round(t/Ln)+"s":t+"ms"}function vS(t){return Yo(t,Wn,"day")||Yo(t,jn,"hour")||Yo(t,Hn,"minute")||Yo(t,Ln,"second")||t+" ms"}function Yo(t,n,o){if(!(t<n))return t<n*1.5?Math.floor(t/n)+" "+o:Math.ceil(t/n)+" "+o+"s"}(function(t,n){n=t.exports=r.debug=r.default=r,n.coerce=p,n.disable=s,n.enable=i,n.enabled=l,n.humanize=gS,n.names=[],n.skips=[],n.formatters={};var o;function a(c){var f=0,u;for(u in c)f=(f<<5)-f+c.charCodeAt(u),f|=0;return n.colors[Math.abs(f)%n.colors.length]}function r(c){function f(){if(f.enabled){var u=f,d=+new Date,m=d-(o||d);u.diff=m,u.prev=o,u.curr=d,o=d;for(var g=new Array(arguments.length),h=0;h<g.length;h++)g[h]=arguments[h];g[0]=n.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");var y=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,function(b,x){if(b==="%%")return b;y++;var C=n.formatters[x];if(typeof C=="function"){var w=g[y];b=C.call(u,w),g.splice(y,1),y--}return b}),n.formatArgs.call(u,g);var v=f.log||n.log||console.log.bind(console);v.apply(u,g)}}return f.namespace=c,f.enabled=n.enabled(c),f.useColors=n.useColors(),f.color=a(c),typeof n.init=="function"&&n.init(f),f}function i(c){n.save(c),n.names=[],n.skips=[];for(var f=(typeof c=="string"?c:"").split(/[\s,]+/),u=f.length,d=0;d<u;d++)f[d]&&(c=f[d].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.substr(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function s(){n.enable("")}function l(c){var f,u;for(f=0,u=n.skips.length;f<u;f++)if(n.skips[f].test(c))return!1;for(f=0,u=n.names.length;f<u;f++)if(n.names[f].test(c))return!0;return!1}function p(c){return c instanceof Error?c.stack||c.message:c}})(ji,ji.exports);var xS=ji.exports;(function(t,n){n=t.exports=xS,n.log=r,n.formatArgs=a,n.save=i,n.load=s,n.useColors=o,n.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:l(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}n.formatters.j=function(p){try{return JSON.stringify(p)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}};function a(p){var c=this.useColors;if(p[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+p[0]+(c?"%c ":" ")+"+"+n.humanize(this.diff),!!c){var f="color: "+this.color;p.splice(1,0,f,"color: inherit");var u=0,d=0;p[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(u++,m==="%c"&&(d=u))}),p.splice(d,0,f)}}function r(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(p){try{p==null?n.storage.removeItem("debug"):n.storage.debug=p}catch{}}function s(){var p;try{p=n.storage.debug}catch{}return!p&&typeof process<"u"&&"env"in process&&(p=process.env.DEBUG),p}n.enable(s());function l(){try{return window.localStorage}catch{}}})(Hi,Hi.exports);var CS=Hi.exports,vp=CS("jsonp"),wS=SS,VS=0;function NS(){}function SS(t,n,o){typeof n=="function"&&(o=n,n={}),n||(n={});var a=n.prefix||"__jp",r=n.name||a+VS++,i=n.param||"callback",s=n.timeout!=null?n.timeout:6e4,l=encodeURIComponent,p=document.getElementsByTagName("script")[0]||document.head,c,f;s&&(f=setTimeout(function(){u(),o&&o(new Error("Timeout"))},s));function u(){c.parentNode&&c.parentNode.removeChild(c),window[r]=NS,f&&clearTimeout(f)}function d(){window[r]&&u()}return window[r]=function(m){vp("jsonp got",m),u(),o&&o(null,m)},t+=(~t.indexOf("?")?"&":"?")+i+"="+l(r),t=t.replace("?&","?"),vp('jsonp req "%s"',t),c=document.createElement("script"),c.src=t,p.parentNode.insertBefore(c,p),d}const TS=bp(wS);var xp={exports:{}};function DS(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Wi={exports:{}};const kS=mS(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Cp;function Me(){return Cp||(Cp=1,function(t,n){(function(o,a){t.exports=a()})(Be,function(){var o=o||function(a,r){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof Be<"u"&&Be.crypto&&(i=Be.crypto),!i&&typeof DS=="function")try{i=kS}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function b(){}return function(x){var C;return b.prototype=x,C=new b,b.prototype=null,C}}(),p={},c=p.lib={},f=c.Base=function(){return{extend:function(b){var x=l(this);return b&&x.mixIn(b),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var x in b)b.hasOwnProperty(x)&&(this[x]=b[x]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=c.WordArray=f.extend({init:function(b,x){b=this.words=b||[],x!=r?this.sigBytes=x:this.sigBytes=b.length*4},toString:function(b){return(b||m).stringify(this)},concat:function(b){var x=this.words,C=b.words,w=this.sigBytes,V=b.sigBytes;if(this.clamp(),w%4)for(var N=0;N<V;N++){var S=C[N>>>2]>>>24-N%4*8&255;x[w+N>>>2]|=S<<24-(w+N)%4*8}else for(var D=0;D<V;D+=4)x[w+D>>>2]=C[D>>>2];return this.sigBytes+=V,this},clamp:function(){var b=this.words,x=this.sigBytes;b[x>>>2]&=4294967295<<32-x%4*8,b.length=a.ceil(x/4)},clone:function(){var b=f.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var x=[],C=0;C<b;C+=4)x.push(s());return new u.init(x,b)}}),d=p.enc={},m=d.Hex={stringify:function(b){for(var x=b.words,C=b.sigBytes,w=[],V=0;V<C;V++){var N=x[V>>>2]>>>24-V%4*8&255;w.push((N>>>4).toString(16)),w.push((N&15).toString(16))}return w.join("")},parse:function(b){for(var x=b.length,C=[],w=0;w<x;w+=2)C[w>>>3]|=parseInt(b.substr(w,2),16)<<24-w%8*4;return new u.init(C,x/2)}},g=d.Latin1={stringify:function(b){for(var x=b.words,C=b.sigBytes,w=[],V=0;V<C;V++){var N=x[V>>>2]>>>24-V%4*8&255;w.push(String.fromCharCode(N))}return w.join("")},parse:function(b){for(var x=b.length,C=[],w=0;w<x;w++)C[w>>>2]|=(b.charCodeAt(w)&255)<<24-w%4*8;return new u.init(C,x)}},h=d.Utf8={stringify:function(b){try{return decodeURIComponent(escape(g.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return g.parse(unescape(encodeURIComponent(b)))}},y=c.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=h.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var x,C=this._data,w=C.words,V=C.sigBytes,N=this.blockSize,S=N*4,D=V/S;b?D=a.ceil(D):D=a.max((D|0)-this._minBufferSize,0);var k=D*N,A=a.min(k*4,V);if(k){for(var $=0;$<k;$+=N)this._doProcessBlock(w,$);x=w.splice(0,k),C.sigBytes-=A}return new u.init(x,A)},clone:function(){var b=f.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0});c.Hasher=y.extend({cfg:f.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){b&&this._append(b);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(b){return function(x,C){return new b.init(C).finalize(x)}},_createHmacHelper:function(b){return function(x,C){return new v.HMAC.init(b,C).finalize(x)}}});var v=p.algo={};return p}(Math);return o})}(Wi)),Wi.exports}var qi={exports:{}},wp;function Zo(){return wp||(wp=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(a){var r=o,i=r.lib,s=i.Base,l=i.WordArray,p=r.x64={};p.Word=s.extend({init:function(c,f){this.high=c,this.low=f}}),p.WordArray=s.extend({init:function(c,f){c=this.words=c||[],f!=a?this.sigBytes=f:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,f=c.length,u=[],d=0;d<f;d++){var m=c[d];u.push(m.high),u.push(m.low)}return l.create(u,this.sigBytes)},clone:function(){for(var c=s.clone.call(this),f=c.words=this.words.slice(0),u=f.length,d=0;d<u;d++)f[d]=f[d].clone();return c}})}(),o})}(qi)),qi.exports}var zi={exports:{}},Vp;function AS(){return Vp||(Vp=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(){if(typeof ArrayBuffer=="function"){var a=o,r=a.lib,i=r.WordArray,s=i.init,l=i.init=function(p){if(p instanceof ArrayBuffer&&(p=new Uint8Array(p)),(p instanceof Int8Array||typeof Uint8ClampedArray<"u"&&p instanceof Uint8ClampedArray||p instanceof Int16Array||p instanceof Uint16Array||p instanceof Int32Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array)&&(p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength)),p instanceof Uint8Array){for(var c=p.byteLength,f=[],u=0;u<c;u++)f[u>>>2]|=p[u]<<24-u%4*8;s.call(this,f,c)}else s.apply(this,arguments)};l.prototype=i}}(),o.lib.WordArray})}(zi)),zi.exports}var Gi={exports:{}},Np;function $S(){return Np||(Np=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,s=a.enc;s.Utf16=s.Utf16BE={stringify:function(p){for(var c=p.words,f=p.sigBytes,u=[],d=0;d<f;d+=2){var m=c[d>>>2]>>>16-d%4*8&65535;u.push(String.fromCharCode(m))}return u.join("")},parse:function(p){for(var c=p.length,f=[],u=0;u<c;u++)f[u>>>1]|=p.charCodeAt(u)<<16-u%2*16;return i.create(f,c*2)}},s.Utf16LE={stringify:function(p){for(var c=p.words,f=p.sigBytes,u=[],d=0;d<f;d+=2){var m=l(c[d>>>2]>>>16-d%4*8&65535);u.push(String.fromCharCode(m))}return u.join("")},parse:function(p){for(var c=p.length,f=[],u=0;u<c;u++)f[u>>>1]|=l(p.charCodeAt(u)<<16-u%2*16);return i.create(f,c*2)}};function l(p){return p<<8&4278255360|p>>>8&16711935}}(),o.enc.Utf16})}(Gi)),Gi.exports}var Ui={exports:{}},Sp;function Wt(){return Sp||(Sp=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,s=a.enc;s.Base64={stringify:function(p){var c=p.words,f=p.sigBytes,u=this._map;p.clamp();for(var d=[],m=0;m<f;m+=3)for(var g=c[m>>>2]>>>24-m%4*8&255,h=c[m+1>>>2]>>>24-(m+1)%4*8&255,y=c[m+2>>>2]>>>24-(m+2)%4*8&255,v=g<<16|h<<8|y,b=0;b<4&&m+b*.75<f;b++)d.push(u.charAt(v>>>6*(3-b)&63));var x=u.charAt(64);if(x)for(;d.length%4;)d.push(x);return d.join("")},parse:function(p){var c=p.length,f=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var d=0;d<f.length;d++)u[f.charCodeAt(d)]=d}var m=f.charAt(64);if(m){var g=p.indexOf(m);g!==-1&&(c=g)}return l(p,c,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function l(p,c,f){for(var u=[],d=0,m=0;m<c;m++)if(m%4){var g=f[p.charCodeAt(m-1)]<<m%4*2,h=f[p.charCodeAt(m)]>>>6-m%4*2,y=g|h;u[d>>>2]|=y<<24-d%4*8,d++}return i.create(u,d)}}(),o.enc.Base64})}(Ui)),Ui.exports}var Yi={exports:{}},Tp;function ES(){return Tp||(Tp=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,s=a.enc;s.Base64url={stringify:function(p,c){c===void 0&&(c=!0);var f=p.words,u=p.sigBytes,d=c?this._safe_map:this._map;p.clamp();for(var m=[],g=0;g<u;g+=3)for(var h=f[g>>>2]>>>24-g%4*8&255,y=f[g+1>>>2]>>>24-(g+1)%4*8&255,v=f[g+2>>>2]>>>24-(g+2)%4*8&255,b=h<<16|y<<8|v,x=0;x<4&&g+x*.75<u;x++)m.push(d.charAt(b>>>6*(3-x)&63));var C=d.charAt(64);if(C)for(;m.length%4;)m.push(C);return m.join("")},parse:function(p,c){c===void 0&&(c=!0);var f=p.length,u=c?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var m=0;m<u.length;m++)d[u.charCodeAt(m)]=m}var g=u.charAt(64);if(g){var h=p.indexOf(g);h!==-1&&(f=h)}return l(p,f,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function l(p,c,f){for(var u=[],d=0,m=0;m<c;m++)if(m%4){var g=f[p.charCodeAt(m-1)]<<m%4*2,h=f[p.charCodeAt(m)]>>>6-m%4*2,y=g|h;u[d>>>2]|=y<<24-d%4*8,d++}return i.create(u,d)}}(),o.enc.Base64url})}(Yi)),Yi.exports}var Zi={exports:{}},Dp;function qt(){return Dp||(Dp=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(a){var r=o,i=r.lib,s=i.WordArray,l=i.Hasher,p=r.algo,c=[];(function(){for(var h=0;h<64;h++)c[h]=a.abs(a.sin(h+1))*4294967296|0})();var f=p.MD5=l.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,y){for(var v=0;v<16;v++){var b=y+v,x=h[b];h[b]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var C=this._hash.words,w=h[y+0],V=h[y+1],N=h[y+2],S=h[y+3],D=h[y+4],k=h[y+5],A=h[y+6],$=h[y+7],T=h[y+8],E=h[y+9],B=h[y+10],I=h[y+11],F=h[y+12],R=h[y+13],O=h[y+14],W=h[y+15],M=C[0],_=C[1],H=C[2],L=C[3];M=u(M,_,H,L,w,7,c[0]),L=u(L,M,_,H,V,12,c[1]),H=u(H,L,M,_,N,17,c[2]),_=u(_,H,L,M,S,22,c[3]),M=u(M,_,H,L,D,7,c[4]),L=u(L,M,_,H,k,12,c[5]),H=u(H,L,M,_,A,17,c[6]),_=u(_,H,L,M,$,22,c[7]),M=u(M,_,H,L,T,7,c[8]),L=u(L,M,_,H,E,12,c[9]),H=u(H,L,M,_,B,17,c[10]),_=u(_,H,L,M,I,22,c[11]),M=u(M,_,H,L,F,7,c[12]),L=u(L,M,_,H,R,12,c[13]),H=u(H,L,M,_,O,17,c[14]),_=u(_,H,L,M,W,22,c[15]),M=d(M,_,H,L,V,5,c[16]),L=d(L,M,_,H,A,9,c[17]),H=d(H,L,M,_,I,14,c[18]),_=d(_,H,L,M,w,20,c[19]),M=d(M,_,H,L,k,5,c[20]),L=d(L,M,_,H,B,9,c[21]),H=d(H,L,M,_,W,14,c[22]),_=d(_,H,L,M,D,20,c[23]),M=d(M,_,H,L,E,5,c[24]),L=d(L,M,_,H,O,9,c[25]),H=d(H,L,M,_,S,14,c[26]),_=d(_,H,L,M,T,20,c[27]),M=d(M,_,H,L,R,5,c[28]),L=d(L,M,_,H,N,9,c[29]),H=d(H,L,M,_,$,14,c[30]),_=d(_,H,L,M,F,20,c[31]),M=m(M,_,H,L,k,4,c[32]),L=m(L,M,_,H,T,11,c[33]),H=m(H,L,M,_,I,16,c[34]),_=m(_,H,L,M,O,23,c[35]),M=m(M,_,H,L,V,4,c[36]),L=m(L,M,_,H,D,11,c[37]),H=m(H,L,M,_,$,16,c[38]),_=m(_,H,L,M,B,23,c[39]),M=m(M,_,H,L,R,4,c[40]),L=m(L,M,_,H,w,11,c[41]),H=m(H,L,M,_,S,16,c[42]),_=m(_,H,L,M,A,23,c[43]),M=m(M,_,H,L,E,4,c[44]),L=m(L,M,_,H,F,11,c[45]),H=m(H,L,M,_,W,16,c[46]),_=m(_,H,L,M,N,23,c[47]),M=g(M,_,H,L,w,6,c[48]),L=g(L,M,_,H,$,10,c[49]),H=g(H,L,M,_,O,15,c[50]),_=g(_,H,L,M,k,21,c[51]),M=g(M,_,H,L,F,6,c[52]),L=g(L,M,_,H,S,10,c[53]),H=g(H,L,M,_,B,15,c[54]),_=g(_,H,L,M,V,21,c[55]),M=g(M,_,H,L,T,6,c[56]),L=g(L,M,_,H,W,10,c[57]),H=g(H,L,M,_,A,15,c[58]),_=g(_,H,L,M,R,21,c[59]),M=g(M,_,H,L,D,6,c[60]),L=g(L,M,_,H,I,10,c[61]),H=g(H,L,M,_,N,15,c[62]),_=g(_,H,L,M,E,21,c[63]),C[0]=C[0]+M|0,C[1]=C[1]+_|0,C[2]=C[2]+H|0,C[3]=C[3]+L|0},_doFinalize:function(){var h=this._data,y=h.words,v=this._nDataBytes*8,b=h.sigBytes*8;y[b>>>5]|=128<<24-b%32;var x=a.floor(v/4294967296),C=v;y[(b+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,y[(b+64>>>9<<4)+14]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,h.sigBytes=(y.length+1)*4,this._process();for(var w=this._hash,V=w.words,N=0;N<4;N++){var S=V[N];V[N]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return w},clone:function(){var h=l.clone.call(this);return h._hash=this._hash.clone(),h}});function u(h,y,v,b,x,C,w){var V=h+(y&v|~y&b)+x+w;return(V<<C|V>>>32-C)+y}function d(h,y,v,b,x,C,w){var V=h+(y&b|v&~b)+x+w;return(V<<C|V>>>32-C)+y}function m(h,y,v,b,x,C,w){var V=h+(y^v^b)+x+w;return(V<<C|V>>>32-C)+y}function g(h,y,v,b,x,C,w){var V=h+(v^(y|~b))+x+w;return(V<<C|V>>>32-C)+y}r.MD5=l._createHelper(f),r.HmacMD5=l._createHmacHelper(f)}(Math),o.MD5})}(Zi)),Zi.exports}var Ki={exports:{}},kp;function Ap(){return kp||(kp=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,s=r.Hasher,l=a.algo,p=[],c=l.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(f,u){for(var d=this._hash.words,m=d[0],g=d[1],h=d[2],y=d[3],v=d[4],b=0;b<80;b++){if(b<16)p[b]=f[u+b]|0;else{var x=p[b-3]^p[b-8]^p[b-14]^p[b-16];p[b]=x<<1|x>>>31}var C=(m<<5|m>>>27)+v+p[b];b<20?C+=(g&h|~g&y)+1518500249:b<40?C+=(g^h^y)+1859775393:b<60?C+=(g&h|g&y|h&y)-1894007588:C+=(g^h^y)-899497514,v=y,y=h,h=g<<30|g>>>2,g=m,m=C}d[0]=d[0]+m|0,d[1]=d[1]+g|0,d[2]=d[2]+h|0,d[3]=d[3]+y|0,d[4]=d[4]+v|0},_doFinalize:function(){var f=this._data,u=f.words,d=this._nDataBytes*8,m=f.sigBytes*8;return u[m>>>5]|=128<<24-m%32,u[(m+64>>>9<<4)+14]=Math.floor(d/4294967296),u[(m+64>>>9<<4)+15]=d,f.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var f=s.clone.call(this);return f._hash=this._hash.clone(),f}});a.SHA1=s._createHelper(c),a.HmacSHA1=s._createHmacHelper(c)}(),o.SHA1})}(Ki)),Ki.exports}var Qi={exports:{}},$p;function Xi(){return $p||($p=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){return function(a){var r=o,i=r.lib,s=i.WordArray,l=i.Hasher,p=r.algo,c=[],f=[];(function(){function m(v){for(var b=a.sqrt(v),x=2;x<=b;x++)if(!(v%x))return!1;return!0}function g(v){return(v-(v|0))*4294967296|0}for(var h=2,y=0;y<64;)m(h)&&(y<8&&(c[y]=g(a.pow(h,1/2))),f[y]=g(a.pow(h,1/3)),y++),h++})();var u=[],d=p.SHA256=l.extend({_doReset:function(){this._hash=new s.init(c.slice(0))},_doProcessBlock:function(m,g){for(var h=this._hash.words,y=h[0],v=h[1],b=h[2],x=h[3],C=h[4],w=h[5],V=h[6],N=h[7],S=0;S<64;S++){if(S<16)u[S]=m[g+S]|0;else{var D=u[S-15],k=(D<<25|D>>>7)^(D<<14|D>>>18)^D>>>3,A=u[S-2],$=(A<<15|A>>>17)^(A<<13|A>>>19)^A>>>10;u[S]=k+u[S-7]+$+u[S-16]}var T=C&w^~C&V,E=y&v^y&b^v&b,B=(y<<30|y>>>2)^(y<<19|y>>>13)^(y<<10|y>>>22),I=(C<<26|C>>>6)^(C<<21|C>>>11)^(C<<7|C>>>25),F=N+I+T+f[S]+u[S],R=B+E;N=V,V=w,w=C,C=x+F|0,x=b,b=v,v=y,y=F+R|0}h[0]=h[0]+y|0,h[1]=h[1]+v|0,h[2]=h[2]+b|0,h[3]=h[3]+x|0,h[4]=h[4]+C|0,h[5]=h[5]+w|0,h[6]=h[6]+V|0,h[7]=h[7]+N|0},_doFinalize:function(){var m=this._data,g=m.words,h=this._nDataBytes*8,y=m.sigBytes*8;return g[y>>>5]|=128<<24-y%32,g[(y+64>>>9<<4)+14]=a.floor(h/4294967296),g[(y+64>>>9<<4)+15]=h,m.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var m=l.clone.call(this);return m._hash=this._hash.clone(),m}});r.SHA256=l._createHelper(d),r.HmacSHA256=l._createHmacHelper(d)}(Math),o.SHA256})}(Qi)),Qi.exports}var Ji={exports:{}},Ep;function BS(){return Ep||(Ep=1,function(t,n){(function(o,a,r){t.exports=a(Me(),Xi())})(Be,function(o){return function(){var a=o,r=a.lib,i=r.WordArray,s=a.algo,l=s.SHA256,p=s.SHA224=l.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=l._doFinalize.call(this);return c.sigBytes-=4,c}});a.SHA224=l._createHelper(p),a.HmacSHA224=l._createHmacHelper(p)}(),o.SHA224})}(Ji)),Ji.exports}var es={exports:{}},Bp;function Fp(){return Bp||(Bp=1,function(t,n){(function(o,a,r){t.exports=a(Me(),Zo())})(Be,function(o){return function(){var a=o,r=a.lib,i=r.Hasher,s=a.x64,l=s.Word,p=s.WordArray,c=a.algo;function f(){return l.create.apply(l,arguments)}var u=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],d=[];(function(){for(var g=0;g<80;g++)d[g]=f()})();var m=c.SHA512=i.extend({_doReset:function(){this._hash=new p.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(g,h){for(var y=this._hash.words,v=y[0],b=y[1],x=y[2],C=y[3],w=y[4],V=y[5],N=y[6],S=y[7],D=v.high,k=v.low,A=b.high,$=b.low,T=x.high,E=x.low,B=C.high,I=C.low,F=w.high,R=w.low,O=V.high,W=V.low,M=N.high,_=N.low,H=S.high,L=S.low,G=D,Y=k,z=A,q=$,j=T,Z=E,U=B,X=I,ie=F,de=R,ne=O,oe=W,ee=M,K=_,se=H,ue=L,Te=0;Te<80;Te++){var ke,_e,te=d[Te];if(Te<16)_e=te.high=g[h+Te*2]|0,ke=te.low=g[h+Te*2+1]|0;else{var ce=d[Te-15],pe=ce.high,we=ce.low,He=(pe>>>1|we<<31)^(pe>>>8|we<<24)^pe>>>7,le=(we>>>1|pe<<31)^(we>>>8|pe<<24)^(we>>>7|pe<<25),he=d[Te-2],Ne=he.high,Fe=he.low,Ue=(Ne>>>19|Fe<<13)^(Ne<<3|Fe>>>29)^Ne>>>6,Ye=(Fe>>>19|Ne<<13)^(Fe<<3|Ne>>>29)^(Fe>>>6|Ne<<26),We=d[Te-7],be=We.high,ze=We.low,it=d[Te-16],bt=it.high,pt=it.low;ke=le+ze,_e=He+be+(ke>>>0<le>>>0?1:0),ke=ke+Ye,_e=_e+Ue+(ke>>>0<Ye>>>0?1:0),ke=ke+pt,_e=_e+bt+(ke>>>0<pt>>>0?1:0),te.high=_e,te.low=ke}var mt=ie&ne^~ie&ee,Dt=de&oe^~de&K,xt=G&z^G&j^z&j,je=Y&q^Y&Z^q&Z,kt=(G>>>28|Y<<4)^(G<<30|Y>>>2)^(G<<25|Y>>>7),Et=(Y>>>28|G<<4)^(Y<<30|G>>>2)^(Y<<25|G>>>7),Ge=(ie>>>14|de<<18)^(ie>>>18|de<<14)^(ie<<23|de>>>9),re=(de>>>14|ie<<18)^(de>>>18|ie<<14)^(de<<23|ie>>>9),fe=u[Te],Ce=fe.high,Re=fe.low,Oe=ue+re,st=se+Ge+(Oe>>>0<ue>>>0?1:0),Oe=Oe+Dt,st=st+mt+(Oe>>>0<Dt>>>0?1:0),Oe=Oe+Re,st=st+Ce+(Oe>>>0<Re>>>0?1:0),Oe=Oe+ke,st=st+_e+(Oe>>>0<ke>>>0?1:0),Ct=Et+je,ht=kt+xt+(Ct>>>0<Et>>>0?1:0);se=ee,ue=K,ee=ne,K=oe,ne=ie,oe=de,de=X+Oe|0,ie=U+st+(de>>>0<X>>>0?1:0)|0,U=j,X=Z,j=z,Z=q,z=G,q=Y,Y=Oe+Ct|0,G=st+ht+(Y>>>0<Oe>>>0?1:0)|0}k=v.low=k+Y,v.high=D+G+(k>>>0<Y>>>0?1:0),$=b.low=$+q,b.high=A+z+($>>>0<q>>>0?1:0),E=x.low=E+Z,x.high=T+j+(E>>>0<Z>>>0?1:0),I=C.low=I+X,C.high=B+U+(I>>>0<X>>>0?1:0),R=w.low=R+de,w.high=F+ie+(R>>>0<de>>>0?1:0),W=V.low=W+oe,V.high=O+ne+(W>>>0<oe>>>0?1:0),_=N.low=_+K,N.high=M+ee+(_>>>0<K>>>0?1:0),L=S.low=L+ue,S.high=H+se+(L>>>0<ue>>>0?1:0)},_doFinalize:function(){var g=this._data,h=g.words,y=this._nDataBytes*8,v=g.sigBytes*8;h[v>>>5]|=128<<24-v%32,h[(v+128>>>10<<5)+30]=Math.floor(y/4294967296),h[(v+128>>>10<<5)+31]=y,g.sigBytes=h.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var g=i.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});a.SHA512=i._createHelper(m),a.HmacSHA512=i._createHmacHelper(m)}(),o.SHA512})}(es)),es.exports}var ts={exports:{}},Ip;function FS(){return Ip||(Ip=1,function(t,n){(function(o,a,r){t.exports=a(Me(),Zo(),Fp())})(Be,function(o){return function(){var a=o,r=a.x64,i=r.Word,s=r.WordArray,l=a.algo,p=l.SHA512,c=l.SHA384=p.extend({_doReset:function(){this._hash=new s.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var f=p._doFinalize.call(this);return f.sigBytes-=16,f}});a.SHA384=p._createHelper(c),a.HmacSHA384=p._createHmacHelper(c)}(),o.SHA384})}(ts)),ts.exports}var ns={exports:{}},Mp;function IS(){return Mp||(Mp=1,function(t,n){(function(o,a,r){t.exports=a(Me(),Zo())})(Be,function(o){return function(a){var r=o,i=r.lib,s=i.WordArray,l=i.Hasher,p=r.x64,c=p.Word,f=r.algo,u=[],d=[],m=[];(function(){for(var y=1,v=0,b=0;b<24;b++){u[y+5*v]=(b+1)*(b+2)/2%64;var x=v%5,C=(2*y+3*v)%5;y=x,v=C}for(var y=0;y<5;y++)for(var v=0;v<5;v++)d[y+5*v]=v+(2*y+3*v)%5*5;for(var w=1,V=0;V<24;V++){for(var N=0,S=0,D=0;D<7;D++){if(w&1){var k=(1<<D)-1;k<32?S^=1<<k:N^=1<<k-32}w&128?w=w<<1^113:w<<=1}m[V]=c.create(N,S)}})();var g=[];(function(){for(var y=0;y<25;y++)g[y]=c.create()})();var h=f.SHA3=l.extend({cfg:l.cfg.extend({outputLength:512}),_doReset:function(){for(var y=this._state=[],v=0;v<25;v++)y[v]=new c.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(y,v){for(var b=this._state,x=this.blockSize/2,C=0;C<x;C++){var w=y[v+2*C],V=y[v+2*C+1];w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,V=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360;var N=b[C];N.high^=V,N.low^=w}for(var S=0;S<24;S++){for(var D=0;D<5;D++){for(var k=0,A=0,$=0;$<5;$++){var N=b[D+5*$];k^=N.high,A^=N.low}var T=g[D];T.high=k,T.low=A}for(var D=0;D<5;D++)for(var E=g[(D+4)%5],B=g[(D+1)%5],I=B.high,F=B.low,k=E.high^(I<<1|F>>>31),A=E.low^(F<<1|I>>>31),$=0;$<5;$++){var N=b[D+5*$];N.high^=k,N.low^=A}for(var R=1;R<25;R++){var k,A,N=b[R],O=N.high,W=N.low,M=u[R];M<32?(k=O<<M|W>>>32-M,A=W<<M|O>>>32-M):(k=W<<M-32|O>>>64-M,A=O<<M-32|W>>>64-M);var _=g[d[R]];_.high=k,_.low=A}var H=g[0],L=b[0];H.high=L.high,H.low=L.low;for(var D=0;D<5;D++)for(var $=0;$<5;$++){var R=D+5*$,N=b[R],G=g[R],Y=g[(D+1)%5+5*$],z=g[(D+2)%5+5*$];N.high=G.high^~Y.high&z.high,N.low=G.low^~Y.low&z.low}var N=b[0],q=m[S];N.high^=q.high,N.low^=q.low}},_doFinalize:function(){var y=this._data,v=y.words;this._nDataBytes*8;var b=y.sigBytes*8,x=this.blockSize*32;v[b>>>5]|=1<<24-b%32,v[(a.ceil((b+1)/x)*x>>>5)-1]|=128,y.sigBytes=v.length*4,this._process();for(var C=this._state,w=this.cfg.outputLength/8,V=w/8,N=[],S=0;S<V;S++){var D=C[S],k=D.high,A=D.low;k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,A=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,N.push(A),N.push(k)}return new s.init(N,w)},clone:function(){for(var y=l.clone.call(this),v=y._state=this._state.slice(0),b=0;b<25;b++)v[b]=v[b].clone();return y}});r.SHA3=l._createHelper(h),r.HmacSHA3=l._createHmacHelper(h)}(Math),o.SHA3})}(ns)),ns.exports}var os={exports:{}},Op;function MS(){return Op||(Op=1,function(t,n){(function(o,a){t.exports=a(Me())})(Be,function(o){/** @preserve
|
|
8
8
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
9
9
|
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
<div class="dot dot3"></div>
|
|
25
25
|
<div class="dot dot4"></div>
|
|
26
26
|
</div>
|
|
27
|
-
</div>`,'<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-coffee"><defs><linearGradient id="gradient" x1="0%" x2="0%" y1="0%" y2="100%"><stop offset="10%" stop-color="black" stop-opacity="0"></stop><stop offset="100%" stop-color="white" stop-opacity="1"></stop></linearGradient><mask id="mask" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><rect x="22" y="8" width="56" height="54" fill="url(#gradient)"></rect></mask><path id="steam" d="M0-4c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0 c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0 c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0 c-2.1,2.6-2.1,6.4,0,9h0c2.1,2.6,2.1,6.4,0,9h0c-2.1,2.6-2.1,6.4,0,9h0c2.1,2.6,2.1,6.4,0,9" stroke-width="6" stroke-linecap="round" fill="#f00" stroke="#58a8f6"></path></defs><g mask="url(#mask)"><use x="29" y="1.00876" href="#steam"><animate attributeName="y" calcMode="linear" values="4;-14" keyTimes="0;1" dur="0.5" begin="0s" repeatCount="indefinite"></animate></use><use x="47" y="-5.98248" href="#steam"><animate attributeName="y" calcMode="linear" values="0;-18" keyTimes="0;1" dur="0.25" begin="0s" repeatCount="indefinite"></animate></use><use x="64" y="-8.48686" href="#steam"><animate attributeName="y" calcMode="linear" values="-4;-22" keyTimes="0;1" dur="0.3333333333333333" begin="0s" repeatCount="indefinite"></animate></use></g><path d="M81.2,52.5l-5.2,0V49c0-1.6-1.3-3-3-3H20c-1.6,0-3,1.3-3,3v11.6C17,71.3,25.7,80,36.5,80h20.1 c7.1,0,13.3-3.8,16.7-9.5h8.3c5.2,0,9.3-4.4,9-9.6C90.2,56.1,86,52.5,81.2,52.5z M81.5,67.5h-6.8c0.8-2.2,1.3-4.5,1.3-7v-5h5.5 c3.3,0,6,2.7,6,6S84.8,67.5,81.5,67.5z" fill="#58a8f6"></path><path d="M78.8,88H19.2c-1.1,0-2-0.9-2-2s0.9-2,2-2h59.5c1.1,0,2,0.9,2,2S79.9,88,78.8,88z" fill="rgba(80.78431372549018%,94.50980392156862%,72.15686274509802%,0)"></path></svg>'],qs=e.defineComponent({name:"FLoading",props:FT,emits:["closed","hidden"],setup(t,n){const o=IT,a=e.ref(t.showMessage),r=e.ref(t.isActive),i=e.ref(t.message),s=e.ref(t.width),l=e.ref(t.type),p=e.ref(null),c=e.ref(null);let f="",u;const d=e.computed(()=>l.value in[0,1,2]?l.value:0);e.onMounted(()=>{g()});const m=e.computed(()=>"transform:translate(-50%,-50%);"+(t.target===document.body?"position:fixed":""));function g(){r.value&&!u&&(u=setTimeout(()=>{u=null,b()},t.delay)),r.value||u&&(clearTimeout(u),u=null)}function h(C){f=C}function y(){return f}function v(C=()=>{}){r.value=!1,n.emit("closed",{loadingId:f,callback:C})}function b(){const C=x();p.value&&p.value.style&&(p.value.style.zIndex=(C+1).toString()),c.value&&c.value.style&&(c.value.style.zIndex=(C+1).toString())}function x(C=1){const w=["body>.f-datagrid-settings-simple-host","body>div","body>farris-dialog>.farris-modal.show","body>.farris-modal.show","body>farris-filter-panel>.f-filter-panel-wrapper","body .f-sidebar-show>.f-sidebar-main","body>.popover.show","body>filter-row-panel>.f-datagrid-filter-panel","body>.f-section-maximize"],V=Array.from(document.body.querySelectorAll(w.join(","))).filter(S=>S).map(S=>{const{display:D,zIndex:k}=window.getComputedStyle(S);return D==="none"?0:parseInt(k,10)}).filter(S=>S);let N=Math.max(...V);return N<1040&&(N=1040),N+C}return n.expose({close:v,setLoadingId:h,getLoadingId:y}),e.watch(()=>t.isActive,C=>{r.value=C,g(),C||v()}),()=>e.createVNode(e.Fragment,null,[r.value?e.createVNode("div",{ref:p,class:"farris-loading-backdrop loading-wait"},null):null,r.value?e.createVNode("div",{ref:c,class:"farris-loading",style:m.value},[e.createVNode("div",{class:"ng-busy-default-wrapper"},[e.createVNode("div",{class:"ng-busy-default-sign"},[e.createVNode("div",{style:[{display:"inline-block"},{margin:"4px"},{width:s.value+"px"},{height:s.value+"px"}],innerHTML:o[d.value]},null),a.value&&e.createVNode("div",{class:"ng-busy-default-text",style:"margin-left:0;",innerHTML:i.value},null)])])]):null])}});let km=-1;const en={};function MT(t){const n=document.createElement("div"),o=t.target||document.body,a=!!t.targetPosition;let r="unset";if(a){const{position:l}=window.getComputedStyle(o);r=l,o.style.position=t.targetPosition}const i=PT();km=i;const s=e.createApp({setup(){const l=e.ref();e.onUnmounted(()=>{a&&(o.style.position=r),n.remove()}),e.onMounted(()=>{l.value&&l.value.setLoadingId(i)});function p(c){s.unmount(),c.callback&&c.callback(),delete en[c.loadingId]}return en[i]=l,()=>e.createVNode(qs,e.mergeProps({ref:l},t,{onClosed:p}),null)}});return o.style=o.style?o.style:{},o.appendChild(n),s.mount(n),en[i]}function OT(){const t=Object.keys(en).map(n=>parseInt(n,10));return t.length?Math.max(...t):0}function PT(){return OT()+1}class _T{static show(n){const o={isActive:!0,target:document.body,targetPosition:"",...n};return MT(o)}static close(n,o=()=>{}){const r=en[n||km];r&&r.value.close(o)}static clearAll(){const n=Object.keys(en);n.length&&n.forEach(o=>{const a=en[o];a&&a.value.close()})}}const RT={install(t){t.component(qs.name,qs),t.provide("FLoadingService",_T)}};function zs(t,n,o){t.stopPropagation();const a=n.value;a&&a.value&&a.value.show(o)}function LT(t,n){t.stopPropagation(),n.value.value.hide()}const HT={mounted:(t,n,o)=>{n.modifiers.hover?(t.addEventListener("mouseenter",a=>zs(a,n,t)),t.addEventListener("mouseleave",a=>LT(a,n))):n.modifiers.click?t.addEventListener("click",a=>zs(a,n,t)):t.addEventListener("click",a=>zs(a,n,t))},unMounted:(t,n,o)=>{}},jT={install(t){t.component(lo.name,lo),t.directive("popover",HT)}},WT=new Map([["appearance",ge]]);function qT(t,n,o){return n}const zT={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/property-editor.schema.json",title:"property-editor",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for property-editor",type:"string"},type:{description:"The type string of property-editor",type:"string",default:"property-editor"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},GT={title:"property-editor",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Am={},UT=me(Am,zT,WT,qT,GT),Je=e.ref({constValue:{type:"const",value:""},variableValue:{type:"variable",value:{category:"",path:"",field:"",fullPath:""}},stateValue:null,customValue:{type:"custom",value:""},expressionValue:{type:"expression",value:""},stateMachineValue:{type:"stateMachine",value:""},dataStatesValue:{type:"dataStates",value:""}}),YT=e.ref([{id:"const",label:"常量"},{id:"variable",label:"变量"},{id:"custom",label:"自定义"},{id:"stateMachine",label:"状态机"},{id:"expression",label:"表达式"},{id:"dataStates",label:"数据状态"}]),ZT={controlName:"userName",propertyName:"readonly",propertyType:"enum",isNewVariable:!1,propertyValue:{type:"const",value:"true"},editorOptions:{types:["const","variable","custom","expression","stateMachine","dataStates"],enums:[{key:"true",value:"是"},{key:"false",value:"否"}],variables:[{category:"remote",path:"root-component.isUserNameReadonly",field:"49311371-fd9f-4019-8611-dce4dcae97fe",fullPath:"isUserNameReadonly"},{category:"remote",path:"isSystem",field:"49311371-fd9f-4019-8611-dce4dcae99fe",fullPath:"isSystem"}],expressionConfig:{editor:"ExpressionEditorComponent",beforeOpenModal:()=>({editorParams:{modalTitle:"只读编辑器",fieldId:"ca30ad64-c9f6-4660-ad66-38073f6bd0b5",viewModelId:"basic-form-viewmodel",expType:"readonly"},value:"{'expr':'DefaultFunction.Length(\\'aaa\\')>2','sexpr':''}"}),exprValue:{type:"expression",value:{type:"expression",parameters:"ca30ad64-c9f6",value:"{'expr':'DefaultFunction.Length(\\'aaa\\')>2','sexpr':''}"}}},stateMachine:[{id:"canRemove",name:"删除",exist:"非"},{id:"canCancelApprove",name:"取消提交审批",exist:"是"},{id:"canApprove",name:"提交审批",exist:"是"},{id:"editable",name:"可编辑",exist:"是"},{id:"canEdit",name:"编辑",exist:"是"},{id:"canRemoveDetail",name:"删除明细",exist:"是"},{id:"canAdd",name:"新增",exist:"是"},{id:"canSave",name:"保存",exist:"是"},{id:"canCancel",name:"取消",exist:"是"},{id:"canAddDetail",name:"新增明细",exist:"是"}],dataStates:[{name:"制单",value:"Billing"},{name:"提交审批",value:"SubmitApproval"},{name:"审批通过",value:"Approved"},{name:"审批不通过",value:"ApprovalNotPassed"}]},hasPrefix:2};function KT(t,n,o,a,r,i,s){let l=0;const p=e.ref(""),c=e.ref([]),f=e.ref(""),u=e.ref("");function d(){t.value.propertyType==="enum"&&t.value.propertyValue.type==="const"&&(f.value=Ae.cloneDeep(t.value.propertyValue.value),n.value=Ae.cloneDeep(t.value.editorOptions.enums))}function m(){t.value.propertyType==="number"&&(l=t.value.propertyValue.value)}function g(){o.value.id==="stateMachine"&&(a=Ae.cloneDeep(t.value.propertyValue.value.id),a?r.value=Ae.cloneDeep(t.value.propertyValue.value.exist):r.value="否")}function h(){if(o.value.id==="dataStates"){c.value=Ae.cloneDeep(t.value.editorOptions.dataStates);let C="",w="";if(t.value.propertyValue.value){const V=t.value.propertyValue.value;c.value.forEach(N=>{V.includes(N.value)&&(C=C.concat(N.value).concat(","))}),w=C.slice(0,-1)}p.value=Ae.cloneDeep(w)}}function y(){o.value.id==="variable"&&(u.value=t.value.propertyValue.value.path)}function v(){if(o.value.id==="expression"){s.value=!0;const{handleExpressionValue:C}=t.value.editorOptions.expressionConfig;C?i.value=C().value.value:i.value=t.value.editorOptions.expressionConfig.expressionValue.value.value}}function b(){o.value.id}function x(){d(),m(),y(),g(),h(),v(),b()}return{numberConstValue:l,bindVariableValue:u,dataStatesBindValue:p,dataStatesValueArray:c,constEnumBindValue:f,setValue:x}}function QT(t,n,o,a,r,i,s,l,p,c,f,u){const d=e.ref(!1),m=e.ref({propertyName:"",propertyType:"",isNewVariable:!1,propertyValue:null,hasPrefix:!1});function g(){n.value.propertyValue.type==="const"&&(n.value.propertyValue.value=Ae.cloneDeep(r.value.constValue.value),o.value=Ae.cloneDeep(r.value.constValue.value),a.value=Ae.cloneDeep(n.value.editorOptions.enums))}function h(){n.value.propertyValue.type==="stateMachine"&&(n.value.propertyValue.value=Ae.cloneDeep(r.value.stateMachineValue.value),i.value=Ae.cloneDeep(n.value.editorOptions.stateMachine),n.value.propertyValue.value.name?Ae.cloneDeep(n.value.propertyValue.value.id):(n.value.propertyValue.value={id:"",name:"",exist:""},l.value="否"))}function y(){n.value.propertyValue.type==="dataStates"&&(n.value.propertyValue.value=Ae.cloneDeep(r.value.dataStatesValue.value),p.value=Ae.cloneDeep(n.value.editorOptions.dataStates))}function v(){c.value="",r.value.expressionValue&&(r.value.expressionValue.value="")}function b(){f.value||(l.value=l.value==="否"?"是":"否",n.value.propertyValue.value.exist=l,r.value.stateMachineValue.value.exist=l,w())}function x(){m.value.propertyValue.value&&m.value.propertyValue.value.includes("viewModel.stateMachine")&&(r.value.customValue.value="")}function C(){m.value.propertyName=Ae.cloneDeep(n.value.propertyName),m.value.propertyType=Ae.cloneDeep(n.value.propertyType),m.value.propertyValue=Ae.cloneDeep(n.value.propertyValue),m.value.hasPrefix=Ae.cloneDeep(d)}function w(){if(!f.value)switch(C(),m.value.propertyValue.type){case"const":(m.value.propertyType==="enum"&&m.value.propertyValue.value!==""||m.value.propertyType==="number"&&m.value.propertyValue.value!=null||m.value.propertyType==="string")&&(v(),t.emit("propertyEditorValueChanged",m));break;case"variable":m.value.propertyValue.value.path!==""&&(v(),t.emit("propertyEditorValueChanged",m));break;case"custom":v(),x(),t.emit("propertyEditorValueChanged",m);break;case"expression":c.value&&t.emit("propertyEditorValueChanged",m);break;case"stateMachine":m.value.propertyValue.value.id&&(v(),t.emit("propertyEditorValueChanged",m));break;case"dataStates":if(m.value.propertyValue.value!==""){v(),t.emit("propertyEditorValueChanged",m);break}}}function V(){n.value.propertyValue=r.value[`${u.value.id}Value`],g(),h(),y(),w(),m.value.isNewVariable=!1}return{updateData:V,changeState:b,prefix:d,propertyEditorValueChange:m}}const Gs=e.defineComponent({name:"FPropertyEditor",props:Am,emits:["propertyEditorValueChanged"],setup(t,n){const o=e.ref(ZT),a=e.ref(""),r=e.ref("const"),i=e.ref([]),s=e.ref(!1);let l;const p=e.ref(""),c=e.ref(""),f=e.ref([]);let u;const d=e.ref([]),m=e.ref("是");e.ref("");const g=e.ref(!1),h=e.ref("<span class='f-icon f-icon-more-horizontal'></span>"),y=e.ref(!1),v=e.ref([]),{numberConstValue:b,bindVariableValue:x,dataStatesBindValue:C,dataStatesValueArray:w,constEnumBindValue:V,setValue:N}=KT(o,i,r,u,m,a,g),{updateData:S,changeState:D,prefix:k,propertyEditorValueChange:A}=QT(n,o,V,i,Je,d,u,m,w,a,y,r);function $(){v.value=YT.value.filter(te=>o.value.editorOptions.types.includes(te.id))}function T(){r.value=Ae.cloneDeep(v.value.find(te=>te.id===o.value.propertyValue.type))}function E(){T(),r.value.id==="variable"&&o.value.propertyValue.value===void 0&&(o.value.propertyValue=Ae.cloneDeep(Je.value.variableValue)),Je.value[`${r.value.id}Value`]=Ae.cloneDeep(o.value.propertyValue),N()}function B(te){r.value=Ae.cloneDeep(v.value.find(ce=>ce.label===te[0].label)),r.value.id==="expression"&&(Je.value.expressionValue.value&&(a.value=Je.value.expressionValue.value.value),g.value=!0),r.value.id==="custom"&&Z(),S()}function I(te){V.value=Ae.cloneDeep(te.value),o.value.propertyValue.value=Ae.cloneDeep(te.value),Je.value.constValue.value=Ae.cloneDeep(te.value),S()}function F(te){Je.value.constValue.value=te,S()}function R(te){Je.value.constValue.value=te,S()}function O(){const te=o.value.propertyName,ce=te[0].toUpperCase()+te.substr(1),pe=o.value.controlName,we=o.value.editorOptions.newVariablePrefix||"",He=we?pe[0].toUpperCase()+pe.substr(1):pe[0].toLowerCase()+pe.substr(1);l=`${we}${He}${ce}`,W()}function W(){M(),r.value.id==="variable"&&(x.value=o.value.propertyValue.value.path),G(),c.value!==o.value.propertyValue.value.path&&S()}function M(){var ce;let te=0;(ce=o.value.editorOptions.variables)==null||ce.forEach(pe=>{pe.path!==l?te+=1:(c.value=o.value.propertyValue.value.path,o.value.propertyValue.value=Ae.cloneDeep(pe),Je.value.variableValue.value=Ae.cloneDeep(pe))}),_(te)}function _(te){var ce;te===((ce=o.value.editorOptions.variables)==null?void 0:ce.length)&&(o.value.propertyValue.value.category="local",o.value.propertyValue.value.path=l,o.value.propertyValue.value.field=p,o.value.propertyValue.value.fullPath=l,o.value.propertyValue.value.newVariableType=o.value.editorOptions.newVariableType,A.value.isNewVariable=!0,o.value.editorOptions.variables.push(Ae.cloneDeep(o.value.propertyValue.value)),Je.value.variableValue.value=Ae.cloneDeep(o.value.propertyValue.value))}function H(te){!te||!te.selections||te.selections.length<1||(Je.value.variableValue.value.category=Ae.cloneDeep(te.selections[0].category),Je.value.variableValue.value.path=Ae.cloneDeep(te.selections[0].path),Je.value.variableValue.value.fullPath=Ae.cloneDeep(te.selections[0].fullPath),Je.value.variableValue.value.field=Ae.cloneDeep(te.selections[0].field),x.value=Ae.cloneDeep(te.value),S())}function L(){o.value.propertyValue.value.category="",o.value.propertyValue.value.path="",o.value.propertyValue.value.field="",o.value.propertyValue.value.fullPath="",r.value.id==="variable"&&(x.value=o.value.propertyValue.value.path),S()}function G(){f.value=Ae.cloneDeep(o.value.editorOptions.variables)}const Y=te=>{const ce=o.value.editorOptions.getVariables,pe={showDialog:!0};return ce&&(f.value=ce(),te&&(te.data=f)),Dd(pe)};function z(te){const ce={id:te[0].id,name:te[0].exist,exist:te[0].name};Je.value.stateMachineValue.value=Ae.cloneDeep(ce),m.value=o.value.propertyValue.value.exist==="是"?"是":"否",u=Ae.cloneDeep(te.value),S()}function q(){d.value=Ae.cloneDeep(o.value.editorOptions.stateMachine),m.value=Je.value.stateMachineValue.value.exist==="是"?"是":"否"}const j=new Vo;function Z(){j.pipe($v(700)).subscribe(te=>{Je.value.customValue.value=te,S()})}function U(te){j.next(te)}function X(){}function ie(te){o.value.propertyValue.value=Ae.cloneDeep(te.selections),Je.value.dataStatesValue.value=Ae.cloneDeep(te.selections),S()}function de(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-variable"},[e.createVNode(rt,{class:[{"form-control-select-show":s.value},{"form-control-select-hide":!s.value}],modelValue:x.value,"onUpdate:modelValue":te=>x.value=te,placeholder:"",viewType:"text",enableClear:!0,idField:"path",textField:"fullPath",data:f.value,beforeShow:Y,readonly:y.value,editable:!1,onValueChange:te=>H(te),onClear:L},null),s.value?e.createVNode("div",{class:"f-page-single-property-editor-component-variable-button"},[e.createVNode("button",{title:"variable-button",class:"f-variable-button",onClick:O},[e.createVNode("span",{class:"f-icon f-icon-add",style:"margin:unset;"},null)])]):""])}function ne(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-customize"},[e.withDirectives(e.createVNode("input",{class:"form-control",placeholder:"输入自定义内容","onUpdate:modelValue":te=>Je.value.customValue.value=te,onChange:te=>{U(te)},disabled:y.value},null),[[e.vModelText,Je.value.customValue.value]])])}function oe(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-expression"},[e.createVNode(Mt,{editable:!1,enableClear:!1,readonly:y.value,groupText:h.value,modelValue:a.value,"onUpdate:modelValue":te=>a.value=te,onClickHandle:X},null)])}function ee(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-stateMachine"},[e.createVNode("div",{class:"f-stateMachine-exist",onClick:D},[m.value]),e.createVNode("div",{class:"f-stateMachine-combo"},[e.createVNode(rt,{modelValue:u,"onUpdate:modelValue":te=>u=te,placeholder:"",viewType:"text",enableClear:!1,idField:"id",textField:"name",data:d.value,editable:!1,readonly:y.value,onChange:te=>{z(te)}},null)])])}function K(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-dataStates"},[e.createVNode(rt,{modelValue:C.value,"onUpdate:modelValue":te=>C.value=te,placeholder:"",viewType:"text",enableClear:!1,idField:"value",textField:"name",data:w.value,editable:!1,readonly:y.value,onValueChange:te=>ie(te)},null)])}function se(){return e.withDirectives(e.createVNode("input",{class:"form-control","onUpdate:modelValue":te=>Je.value.constValue.value=te,onChange:te=>{R(te)},disabled:y.value,placeholder:"输入自定义内容"},null),[[e.vModelText,Je.value.constValue.value]])}function ue(){return e.createVNode(rt,{modelValue:V.value,"onUpdate:modelValue":te=>V.value=te,placeholder:"",viewType:"text",enableClear:!1,idField:"key",textField:"value",data:i.value,editable:!1,readonly:y.value,onValueChange:te=>I(te)},null)}function Te(){return e.createVNode(Bt,{canNull:!0,readonly:y.value,modelValue:b,"onUpdate:modelValue":te=>b=te,onValueChange:te=>{F(te)},class:"f-page-single-property-editor-component-const-number"},null)}function ke(){return e.createVNode("div",{class:"f-page-single-property-editor-component-left-controller"},[e.createVNode(rt,{modelValue:r.value.id,"onUpdate:modelValue":te=>r.value.id=te,placeholder:"",enableClear:!1,"id-field":"id","text-field":"label",data:v.value,editable:!1,readonly:y.value,onChange:te=>B(te)},null)])}function _e(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-controller"},[r.value.id==="const"?e.createVNode("div",{class:"f-page-single-property-editor-component-right-const"},[o.value.propertyType==="string"?se():"",o.value.propertyType==="enum"?ue():"",o.value.propertyType==="number"?Te():""]):"",r.value.id==="variable"?de():"",r.value.id==="custom"?ne():"",r.value.id==="expression"&&g.value?oe():"",r.value.id==="stateMachine"?ee():"",r.value.id==="dataStates"?K():""])}return e.onMounted(()=>{$(),E(),G(),q(),o.value.hasPrefix&&o.value.hasPrefix===2&&(k.value=!0),o.value.controlName!==void 0&&(s.value=!0)}),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-page-single-property-editor-component clearfix"},[ke(),_e()])])}}),XT={install(t){t.component(Gs.name,Gs)},register(t,n,o){t["property-editor"]=Gs,n["property-editor"]=UT}},JT={install(t){t.component(kr.name,kr)}},eD=e.defineComponent({name:"FRadioButtonDesign",props:hi,emits:[""],setup(t,n){return()=>e.createVNode(e.Fragment,null,null)}}),tD={install(t){t.component(Wo.name,Wo)},register(t,n,o){t["radio-button"]=Wo,n["radio-button"]=wf},registerDesigner(t,n,o){t["radio-button"]=eD,n["radio-button"]=wf}},nD={defaultSpacings:{type:Array,default:[{id:"default",value:"4",name:"系统默认"},{id:"large",value:"20",name:"大(20px)"},{id:"middle",value:"16",name:"中(16px)"},{id:"small",value:"12",name:"小(12px)"},{id:"exsmall",value:"8",name:"超小(8px)"},{id:"none",value:"0",name:"无(0px)"},{id:"custom",value:"custom",name:"自定义"}]},directions:{type:Array,default:[{id:"top",title:"上"},{id:"right",title:"右"},{id:"bottom",title:"下"},{id:"left",title:"左"}]},margins:{type:Array,default:[4,4,4,4]},paddings:{type:Array,default:[4,4,4,4]}};function oD(t,n){const{defaultSpacings:o}=t,{directions:a}=t,r=e.ref(t.margins),i=e.ref(t.paddings),s=e.ref(!1),l=e.ref("default"),p=e.computed(()=>({"f-icon":!0,"mr-1":!0,"f-spacing-editor-icon":!0,"f-icon-arrow-60-right":!s.value,"f-icon-arrow-60-down":s.value})),c=e.computed(()=>({margin:r.value.join("px ")+"px",padding:i.value.join("px ")+"px"}));function f(){s.value=!s.value}function u(h){h[0].name!=="自定义"?(r.value.fill(h[0].value),s.value=!1,e.nextTick(()=>{s.value=!0}),n.emit("valueChanged",c.value)):s.value=!0}function d(){l.value="custom",n.emit("valueChanged",c.value)}function m(){return s.value?e.createVNode("div",{class:"f-spacing-editor-custom-container"},[a.map((h,y)=>e.createVNode("div",null,[e.createVNode("div",{class:"f-spacing-editor-custom"},[e.createVNode("div",{class:"f-spacing-editor-title"},[h.title,e.createTextVNode("间距(px)")]),e.createVNode(Bt,{style:"flex: 1 1 0",min:0,modelValue:r.value[y],"onUpdate:modelValue":v=>r.value[y]=v,onChange:d},null)])]))]):""}function g(){return e.createVNode("div",{class:"f-spacing-editor-container"},[e.createVNode("div",{style:"display: flex"},[e.createVNode("div",{class:"f-spacing-editor-title"},[e.createVNode("div",{class:p.value,onClick:f},null),e.createVNode("div",null,[e.createTextVNode("外间距")])]),e.createVNode(rt,{style:"flex: 1 1 0",data:o,modelValue:l.value,"onUpdate:modelValue":h=>l.value=h,onChange:u},null)]),m()])}return{renderSpacingEditorMargin:g}}function aD(t,n){const{defaultSpacings:o}=t,{directions:a}=t,r=e.ref(t.margins),i=e.ref(t.paddings),s=e.ref(!1),l=e.ref("default"),p=e.computed(()=>({"f-icon":!0,"mr-1":!0,"f-spacing-editor-icon":!0,"f-icon-arrow-60-right":!s.value,"f-icon-arrow-60-down":s.value})),c=e.computed(()=>({margin:r.value.join("px ")+"px",padding:i.value.join("px ")+"px"}));function f(){s.value=!s.value}function u(h){h[0].name!=="自定义"?(i.value.fill(h[0].value),s.value=!1,e.nextTick(()=>{s.value=!0}),n.emit("valueChanged",c.value)):s.value=!0}function d(){l.value="custom",n.emit("valueChanged",c.value)}function m(){return s.value?e.createVNode("div",{class:"f-spacing-editor-custom-container"},[a.map((h,y)=>e.createVNode("div",null,[e.createVNode("div",{class:"f-spacing-editor-custom"},[e.createVNode("div",{class:"f-spacing-editor-title"},[h.title,e.createTextVNode("间距(px)")]),e.createVNode(Bt,{style:"flex: 1 1 0",min:0,modelValue:i.value[y],"onUpdate:modelValue":v=>i.value[y]=v,onChange:d},null)])]))]):""}function g(){return e.createVNode("div",{class:"f-spacing-editor-container"},[e.createVNode("div",{style:"display: flex"},[e.createVNode("div",{class:"f-spacing-editor-title"},[e.createVNode("div",{class:p.value,onClick:f},null),e.createVNode("div",null,[e.createTextVNode("内间距")])]),e.createVNode(rt,{style:"flex: 1 1 0",data:o,modelValue:l.value,"onUpdate:modelValue":h=>l.value=h,onChange:u},null)]),m()])}return{renderSpacingEditorPadding:g}}const $m=e.defineComponent({name:"FSpacingEditor",props:nD,emits:["valueChanged"],setup(t,n){const{renderSpacingEditorMargin:o}=oD(t,n),{renderSpacingEditorPadding:a}=aD(t,n);return()=>e.createVNode("div",null,[o(),a()])}}),rD={install(t){t.component($m.name,$m)}},iD={content:{type:String,default:"top"},contentTemplate:{type:Object},width:{type:String},customClass:{type:String},placement:{type:String,default:"top"},trigger:{type:String,default:"hover"},reference:{type:Object,require:!0},horizontalRelative:{type:String,default:""},verticalRelative:{type:String,default:""}};function sD(t,n){const o=new Map([["top","bottom"],["bottom","top"],["left","right"],["right","left"]]),a=new Map([["top","height"],["bottom","height"],["left","width"],["right","width"]]);function r(s,l){const p=o.get(l)||l;return s.replace(l,p)}function i(s,l,p,c,f){let u=s;const d=s.split("-")[0],m=a.get(d),g=c[m]+f[m];return Math.abs(p[d]-l[d])<g&&(u=r(s,d)),u}return{adjustPlacement:i}}function lD(t,n){function a(i,s,l){let p=!1,c=l;return(s==="left"||s==="top")&&l<=i[s]&&(p=!0,c=i[s]+6),(s==="right"||s==="bottom")&&l>=i[s]&&(p=!0,c=i[s]-6),{overBound:p,fixedValue:c}}function r(i,s,l,p,c,f,u){let d=s.tooltip.left,m=s.tooltip.top,g=s.arrow.left,h=s.arrow.top;const v=i.split("-")[0];if(["top","bottom"].includes(v)){const V=a(l,"left",s.tooltip.left),N=a(l,"right",s.tooltip.left+c.width);d=V.overBound?V.fixedValue:N.overBound?N.fixedValue-c.width:s.tooltip.left,g=V.overBound?c.width-(d+c.width-p.right)-u.width:N.overBound?p.left-d:s.arrow.left}const b=a(l,"top",s.tooltip.top),x=a(l,"bottom",s.tooltip.top+c.height);return m=b.overBound?b.fixedValue:x.overBound?x.fixedValue-c.height:s.tooltip.top,h=b.overBound?s.arrow.top:x.overBound?c.height-(m+c.height-p.top):s.arrow.top,{arrow:{left:g,top:h},tooltip:{left:d,top:m}}}return{adjustPosition:r}}function cD(t,n){function a(s,l,p,c,f){const u=s.split("-"),d=u[0],m=u[1]||"middle",g=["top","bottom"].includes(d)?m==="middle"?(c.width-f.width)/2:m==="right"?c.width-f.width-6:6:0,h=["left","right"].includes(d)?m==="middle"?(c.height-f.height)/2:m==="bottom"?c.height-f.height-6:6:0,y=d==="left"?c.width+f.width:0,v=d==="top"?c.height+f.height:0;return{left:y+g,top:v+h,right:0}}function r(s,l,p,c,f){const u=s.split("-"),d=u[0],m=u[1]||"middle",g=(p.width-c.width)/2,h=(p.height-c.height)/2,y=d==="right"?l.right:l.left,v=d==="bottom"?l.bottom:l.top,b=d==="top"?0-h-c.height-f.height:d==="bottom"?0-h+f.height:0,x=["left","right"].includes(d)?m==="middle"?(l.height-c.height)/2:m==="bottom"?l.height-c.height:0:0,C=d==="left"?0-g-c.width-f.width:d==="right"?0-g+f.width:0,w=["top","bottom"].includes(d)?m==="middle"?(l.width-c.width)/2:m==="right"?l.width-c.width:0:0,V=v+b+x;return{left:y+C+w,top:V}}function i(s,l,p,c,f){const u=r(s,l,p,c,f);return{arrow:a(s,l,p,c,f),tooltip:u}}return{calculate:i}}function dD(t,n){const o=e.ref(t.horizontalRelative),a=e.ref(t.verticalRelative);function r(s){return typeof s=="string"?document.querySelector(s):s}function i(){let s=document.documentElement.clientWidth,l=document.documentElement.clientHeight,p=0,c=0,f=0,u=0,d=l-p,m=s-c;return o.value&&({left:c,right:s,x:f,width:m}=r(o.value).getBoundingClientRect()),a.value&&({bottom:l,top:p,y:u,height:d}=r(a.value).getBoundingClientRect()),{top:p,left:c,right:s,bottom:l,height:d,width:m,x:f,y:u}}return{getRelativeElementBound:i}}function uD(t,n,o,a,r,i){const s=e.ref(t.placement),{getRelativeElementBound:l}=dD(t),{calculate:p}=cD(),{adjustPlacement:c}=sD(),{adjustPosition:f}=lD(),u=e.computed(()=>s.value.split("-")[0]),d=e.computed(()=>{const m=l();s.value=c(s.value,m,o,a,i);const g=p(s.value,o,a,r,i);return f(s.value,g,m,o,a,r,i)});return{tooltipPlacement:u,tooltipPosition:d}}const Us=e.defineComponent({name:"FTooltip",props:iD,emits:["click"],setup(t,n){const o=e.ref(),a=e.ref(),r=e.ref(),i=e.ref(),s=e.ref(t.placement.split("-")[0]),l=e.computed(()=>{const w={tooltip:!0,show:!0},V=`bs-tooltip-${s.value}`;return w[V]=!0,w}),{scrollLeft:p,scrollTop:c}=document.documentElement,f=e.computed(()=>t.content&&!t.contentTemplate),u=e.computed(()=>t.content),d=e.ref("0px"),m=e.ref("0px");e.ref("");const g=e.computed(()=>({left:d.value,top:m.value})),h=e.ref(""),y=e.ref(""),v=e.computed(()=>({left:h.value,top:y.value})),b=e.computed(()=>({"tooltip-inner":!0,"tooltip-inner-lg":r.value&&r.value&&r.value.scrollHeight>r.value.clientHeight})),x=e.computed(()=>{const w={};return t.width&&Object.assign(w,{width:t.width,"max-width":"none"}),w});e.onMounted(()=>{if(!f.value&&t.contentTemplate&&i.value&&i.value.appendChild(t.contentTemplate),o.value&&a.value&&r.value&&t.reference){const{tooltipPlacement:w,tooltipPosition:V}=uD(t,n,t.reference.getBoundingClientRect(),a.value.getBoundingClientRect(),r.value.getBoundingClientRect(),o.value.getBoundingClientRect());d.value=`${V.value.tooltip.left+p}px`,m.value=`${V.value.tooltip.top+c}px`,h.value=`${V.value.arrow.left}px`,y.value=`${V.value.arrow.top}px`,s.value=w.value}});function C(w){n.emit("click",w)}return()=>e.createVNode("div",{ref:a,class:l.value,style:g.value,onClick:C},[e.createVNode("div",{ref:o,class:"arrow",style:v.value},null),e.createVNode("div",{ref:r,class:b.value,style:x.value},[e.createVNode("div",{class:"tooltip-tmpl"},[f.value&&e.createVNode("div",{class:"tooltip-text",innerHTML:u.value},null),!f.value&&e.createVNode("div",{class:"tooltip-text",ref:i},null)])])])}});function fD(t,n){const o=document.createElement("div");t.customClass&&(o.className=t.customClass);const a=e.createApp({setup(){return e.onUnmounted(()=>{document.body.removeChild(o)}),()=>e.createVNode(Us,e.mergeProps(t,{onClick:a.unmount}),null)}});return document.body.appendChild(o),a.mount(o),a}function Em(t){const n=e.reactive({...t});return fD(n)}function pD(t,n){let o;t.addEventListener("mouseenter",a=>{if(a.stopPropagation(),!o){const r=t.dataset.tooltip&&JSON.parse(t.dataset.tooltip)||{},i=Object.assign({reference:t,contentTemplate:n.value.contentTemplate},r);o=Em(i)}}),t.addEventListener("mouseleave",a=>{a.stopPropagation(),o&&(o.unmount(),o=null)})}function Bm(t,n){t.stopPropagation(),n&&(n.unmount(),n=null)}function mD(t,n){let o;t.addEventListener("click",a=>{if(a.stopPropagation(),!o){const r=t.dataset.tooltip&&JSON.parse(t.dataset.tooltip)||{},i=Object.assign({trigger:"hover",reference:t},r);o=Em(i)}}),document.body.addEventListener("click",a=>{Bm(a,o),o=null})}function Fm(t,n){if(!n.value)t.dataset.tooltip="";else{const{contentTemplate:o,...a}=n.value;t.dataset.tooltip=JSON.stringify(a)}}const hD={mounted:(t,n,o)=>{switch(Fm(t,n),n.value.trigger){case"click":{mD(t);break}default:pD(t,n)}},unMounted:(t,n,o)=>{n.value.trigger==="click"&&document.body.removeEventListener("click",()=>Bm)},beforeUpdate:(t,n)=>{Fm(t,n)}},gD={install(t){t.component(Us.name,Us),t.directive("tooltip",hD)}},yD=new Map([["appearance",ge]]);function bD(t,n,o){return n}const vD={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/expression-editor.schema.json",title:"expression-editor",description:"A Farris Expression Editor Component",type:"object",properties:{id:{description:"The unique identifier for a Expression Editor",type:"string"},type:{description:"The type string of Expression Editor component",type:"string",default:"expression-editor"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}}},required:["id","type"]},xD={title:"expression-editor",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}}}},Ys={},Im=me(Ys,vD,yD,bD,xD),Zs=e.defineComponent({name:"FExpressionEditor",props:Ys,emits:[],setup(t,n){const o=e.ref();return e.onMounted(()=>{}),()=>e.createVNode("div",{ref:o,class:"d-flex h-100 f-utils-flex-column",style:"min-height:450px"},[e.createVNode(e.resolveComponent("f-layout"),{class:"flex-column"},{default:()=>[e.createVNode(e.resolveComponent("f-layout-pane"),{"custom-class":"position-relative",position:"top",minHeight:120},{default:()=>[e.createVNode("div",{class:"f-utils-absolute-all bg-info",style:"opacity:0.2;z-index: -1;"},null),e.createVNode("p",null,[e.createTextVNode("头部区域")])]}),e.createVNode(e.resolveComponent("f-layout-pane"),{position:"center"},{default:()=>[e.createVNode(e.resolveComponent("f-layout"),null,{default:()=>[e.createVNode(e.resolveComponent("f-layout-pane"),{position:"left",minWidth:200,width:400},{default:()=>[e.createVNode("div",{class:"f-utils-absolute-all bg-info",style:"opacity:0.2;z-index: -1;"},null),e.createVNode("p",null,[e.createTextVNode("左侧区域")])]}),e.createVNode(e.resolveComponent("f-layout-pane"),{position:"center"},{default:()=>[e.createVNode("div",{class:"f-utils-absolute-all bg-danger",style:"opacity:0.2;z-index:-1"},null),e.createVNode("p",null,[e.createTextVNode("右侧区域")])]})]})]})]})])}}),CD=e.defineComponent({name:"FExpressionEditorDesign",props:Ys,emits:[],setup(t,n){return()=>e.createVNode(e.Fragment,null,[e.createTextVNode("expression editor design")])}}),wD={install(t){t.component(Zs.name,Zs)},register(t,n,o){t["expression-editor"]=Zs,n["expression-editor"]=Im},registerDesigner(t,n,o){t["expression-editor"]=CD,n["expression-editor"]=Im}};return{install(t){t.use(sl).use(dl).use(G2).use(U2).use(Oc).use(Fc).use(Rc).use(K2).use(Lc).use(Yc).use(Bd).use(Zc).use(tT).use(Xc).use(Nw).use(Id).use(zd).use(jd).use(iT).use(oT).use(Zd).use(pm).use(cT).use(hT).use(BT).use(cu).use(ru).use(fu).use(pu).use(xu).use(wu).use(ku).use(RT).use(Eu).use(Fu).use(V1).use($h).use(Mu).use(s1).use(Ru).use(Lu).use(Hu).use(Ku).use(Yu).use(rf).use(jT).use(lf).use(XT).use(JT).use(ff).use(vf).use(Nf).use(zu).use(pf).use(tD).use(hf).use(Df).use(kf).use($f).use(rD).use(Mf).use(Pf).use(_f).use(Rf).use(Lf).use(Wf).use(Yf).use(gD).use(Zf).use(JC).use(Xf).use(fp).use(hp).use(sm).use(wD)}}});
|
|
27
|
+
</div>`,'<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-coffee"><defs><linearGradient id="gradient" x1="0%" x2="0%" y1="0%" y2="100%"><stop offset="10%" stop-color="black" stop-opacity="0"></stop><stop offset="100%" stop-color="white" stop-opacity="1"></stop></linearGradient><mask id="mask" maskUnits="userSpaceOnUse" x="0" y="0" width="100" height="100"><rect x="22" y="8" width="56" height="54" fill="url(#gradient)"></rect></mask><path id="steam" d="M0-4c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0 c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0 c2.1,2.6,2.1,6.4,0,9l0,0c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9c-2.1,2.6-2.1,6.4,0,9l0,0c2.1,2.6,2.1,6.4,0,9l0,0 c-2.1,2.6-2.1,6.4,0,9h0c2.1,2.6,2.1,6.4,0,9h0c-2.1,2.6-2.1,6.4,0,9h0c2.1,2.6,2.1,6.4,0,9" stroke-width="6" stroke-linecap="round" fill="#f00" stroke="#58a8f6"></path></defs><g mask="url(#mask)"><use x="29" y="1.00876" href="#steam"><animate attributeName="y" calcMode="linear" values="4;-14" keyTimes="0;1" dur="0.5" begin="0s" repeatCount="indefinite"></animate></use><use x="47" y="-5.98248" href="#steam"><animate attributeName="y" calcMode="linear" values="0;-18" keyTimes="0;1" dur="0.25" begin="0s" repeatCount="indefinite"></animate></use><use x="64" y="-8.48686" href="#steam"><animate attributeName="y" calcMode="linear" values="-4;-22" keyTimes="0;1" dur="0.3333333333333333" begin="0s" repeatCount="indefinite"></animate></use></g><path d="M81.2,52.5l-5.2,0V49c0-1.6-1.3-3-3-3H20c-1.6,0-3,1.3-3,3v11.6C17,71.3,25.7,80,36.5,80h20.1 c7.1,0,13.3-3.8,16.7-9.5h8.3c5.2,0,9.3-4.4,9-9.6C90.2,56.1,86,52.5,81.2,52.5z M81.5,67.5h-6.8c0.8-2.2,1.3-4.5,1.3-7v-5h5.5 c3.3,0,6,2.7,6,6S84.8,67.5,81.5,67.5z" fill="#58a8f6"></path><path d="M78.8,88H19.2c-1.1,0-2-0.9-2-2s0.9-2,2-2h59.5c1.1,0,2,0.9,2,2S79.9,88,78.8,88z" fill="rgba(80.78431372549018%,94.50980392156862%,72.15686274509802%,0)"></path></svg>'],qs=e.defineComponent({name:"FLoading",props:FT,emits:["closed","hidden"],setup(t,n){const o=IT,a=e.ref(t.showMessage),r=e.ref(t.isActive),i=e.ref(t.message),s=e.ref(t.width),l=e.ref(t.type),p=e.ref(null),c=e.ref(null);let f="",u;const d=e.computed(()=>l.value in[0,1,2]?l.value:0);e.onMounted(()=>{g()});const m=e.computed(()=>"transform:translate(-50%,-50%);"+(t.target===document.body?"position:fixed":""));function g(){r.value&&!u&&(u=setTimeout(()=>{u=null,b()},t.delay)),r.value||u&&(clearTimeout(u),u=null)}function h(C){f=C}function y(){return f}function v(C=()=>{}){r.value=!1,n.emit("closed",{loadingId:f,callback:C})}function b(){const C=x();p.value&&p.value.style&&(p.value.style.zIndex=(C+1).toString()),c.value&&c.value.style&&(c.value.style.zIndex=(C+1).toString())}function x(C=1){const w=["body>.f-datagrid-settings-simple-host","body>div","body>farris-dialog>.farris-modal.show","body>.farris-modal.show","body>farris-filter-panel>.f-filter-panel-wrapper","body .f-sidebar-show>.f-sidebar-main","body>.popover.show","body>filter-row-panel>.f-datagrid-filter-panel","body>.f-section-maximize"],V=Array.from(document.body.querySelectorAll(w.join(","))).filter(S=>S).map(S=>{const{display:D,zIndex:k}=window.getComputedStyle(S);return D==="none"?0:parseInt(k,10)}).filter(S=>S);let N=Math.max(...V);return N<1040&&(N=1040),N+C}return n.expose({close:v,setLoadingId:h,getLoadingId:y}),e.watch(()=>t.isActive,C=>{r.value=C,g(),C||v()}),()=>e.createVNode(e.Fragment,null,[r.value?e.createVNode("div",{ref:p,class:"farris-loading-backdrop loading-wait"},null):null,r.value?e.createVNode("div",{ref:c,class:"farris-loading",style:m.value},[e.createVNode("div",{class:"ng-busy-default-wrapper"},[e.createVNode("div",{class:"ng-busy-default-sign"},[e.createVNode("div",{style:[{display:"inline-block"},{margin:"4px"},{width:s.value+"px"},{height:s.value+"px"}],innerHTML:o[d.value]},null),a.value&&e.createVNode("div",{class:"ng-busy-default-text",style:"margin-left:0;",innerHTML:i.value},null)])])]):null])}});let km=-1;const en={};function MT(t){const n=document.createElement("div"),o=t.target||document.body,a=!!t.targetPosition;let r="unset";if(a){const{position:l}=window.getComputedStyle(o);r=l,o.style.position=t.targetPosition}const i=PT();km=i;const s=e.createApp({setup(){const l=e.ref();e.onUnmounted(()=>{a&&(o.style.position=r),n.remove()}),e.onMounted(()=>{l.value&&l.value.setLoadingId(i)});function p(c){s.unmount(),c.callback&&c.callback(),delete en[c.loadingId]}return en[i]=l,()=>e.createVNode(qs,e.mergeProps({ref:l},t,{onClosed:p}),null)}});return o.style=o.style?o.style:{},o.appendChild(n),s.mount(n),en[i]}function OT(){const t=Object.keys(en).map(n=>parseInt(n,10));return t.length?Math.max(...t):0}function PT(){return OT()+1}class _T{static show(n){const o={isActive:!0,target:document.body,targetPosition:"",...n};return MT(o)}static close(n,o=()=>{}){const r=en[n||km];r&&r.value.close(o)}static clearAll(){const n=Object.keys(en);n.length&&n.forEach(o=>{const a=en[o];a&&a.value.close()})}}const RT={install(t){t.component(qs.name,qs),t.provide("FLoadingService",_T)}};function zs(t,n,o){t.stopPropagation();const a=n.value;a&&a.value&&a.value.show(o)}function LT(t,n){t.stopPropagation(),n.value.value.hide()}const HT={mounted:(t,n,o)=>{n.modifiers.hover?(t.addEventListener("mouseenter",a=>zs(a,n,t)),t.addEventListener("mouseleave",a=>LT(a,n))):n.modifiers.click?t.addEventListener("click",a=>zs(a,n,t)):t.addEventListener("click",a=>zs(a,n,t))},unMounted:(t,n,o)=>{}},jT={install(t){t.component(lo.name,lo),t.directive("popover",HT)}},WT=new Map([["appearance",ge]]);function qT(t,n,o){return n}const zT={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/property-editor.schema.json",title:"property-editor",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for property-editor",type:"string"},type:{description:"The type string of property-editor",type:"string",default:"property-editor"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},GT={title:"property-editor",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Am={},UT=me(Am,zT,WT,qT,GT),Je=e.ref({constValue:{type:"const",value:""},variableValue:{type:"variable",value:{category:"",path:"",field:"",fullPath:""}},stateValue:null,customValue:{type:"custom",value:""},expressionValue:{type:"expression",value:""},stateMachineValue:{type:"stateMachine",value:""},dataStatesValue:{type:"dataStates",value:""}}),YT=e.ref([{id:"const",label:"常量"},{id:"variable",label:"变量"},{id:"custom",label:"自定义"},{id:"stateMachine",label:"状态机"},{id:"expression",label:"表达式"},{id:"dataStates",label:"数据状态"}]),ZT={controlName:"userName",propertyName:"readonly",propertyType:"enum",isNewVariable:!1,propertyValue:{type:"const",value:"true"},editorOptions:{types:["const","variable","custom","expression","stateMachine","dataStates"],enums:[{key:"true",value:"是"},{key:"false",value:"否"}],variables:[{category:"remote",path:"root-component.isUserNameReadonly",field:"49311371-fd9f-4019-8611-dce4dcae97fe",fullPath:"isUserNameReadonly"},{category:"remote",path:"isSystem",field:"49311371-fd9f-4019-8611-dce4dcae99fe",fullPath:"isSystem"}],expressionConfig:{editor:"ExpressionEditorComponent",beforeOpenModal:()=>({editorParams:{modalTitle:"只读编辑器",fieldId:"ca30ad64-c9f6-4660-ad66-38073f6bd0b5",viewModelId:"basic-form-viewmodel",expType:"readonly"},value:"{'expr':'DefaultFunction.Length(\\'aaa\\')>2','sexpr':''}"}),exprValue:{type:"expression",value:{type:"expression",parameters:"ca30ad64-c9f6",value:"{'expr':'DefaultFunction.Length(\\'aaa\\')>2','sexpr':''}"}}},stateMachine:[{id:"canRemove",name:"删除",exist:"非"},{id:"canCancelApprove",name:"取消提交审批",exist:"是"},{id:"canApprove",name:"提交审批",exist:"是"},{id:"editable",name:"可编辑",exist:"是"},{id:"canEdit",name:"编辑",exist:"是"},{id:"canRemoveDetail",name:"删除明细",exist:"是"},{id:"canAdd",name:"新增",exist:"是"},{id:"canSave",name:"保存",exist:"是"},{id:"canCancel",name:"取消",exist:"是"},{id:"canAddDetail",name:"新增明细",exist:"是"}],dataStates:[{name:"制单",value:"Billing"},{name:"提交审批",value:"SubmitApproval"},{name:"审批通过",value:"Approved"},{name:"审批不通过",value:"ApprovalNotPassed"}]},hasPrefix:2};function KT(t,n,o,a,r,i,s){const l=e.ref(0),p=e.ref(""),c=e.ref([]),f=e.ref(""),u=e.ref("");function d(){t.value.propertyType==="enum"&&t.value.propertyValue.type==="const"&&(f.value=Ae.cloneDeep(t.value.propertyValue.value),n.value=Ae.cloneDeep(t.value.editorOptions.enums))}function m(){t.value.propertyType==="number"&&(l.value=t.value.propertyValue.value)}function g(){o.value.id==="stateMachine"&&(a=Ae.cloneDeep(t.value.propertyValue.value.id),a?r.value=Ae.cloneDeep(t.value.propertyValue.value.exist):r.value="否")}function h(){if(o.value.id==="dataStates"){c.value=Ae.cloneDeep(t.value.editorOptions.dataStates);let C="",w="";if(t.value.propertyValue.value){const V=t.value.propertyValue.value;c.value.forEach(N=>{V.includes(N.value)&&(C=C.concat(N.value).concat(","))}),w=C.slice(0,-1)}p.value=Ae.cloneDeep(w)}}function y(){o.value.id==="variable"&&(u.value=t.value.propertyValue.value.path)}function v(){if(o.value.id==="expression"){s.value=!0;const{handleExpressionValue:C}=t.value.editorOptions.expressionConfig;C?i.value=C().value.value:i.value=t.value.editorOptions.expressionConfig.expressionValue.value.value}}function b(){o.value.id}function x(){d(),m(),y(),g(),h(),v(),b()}return{numberConstValue:l,bindVariableValue:u,dataStatesBindValue:p,dataStatesValueArray:c,constEnumBindValue:f,setValue:x}}function QT(t,n,o,a,r,i,s,l,p,c,f,u){const d=e.ref(!1),m=e.ref({propertyName:"",propertyType:"",isNewVariable:!1,propertyValue:null,hasPrefix:!1});function g(){n.value.propertyValue.type==="const"&&(n.value.propertyValue.value=Ae.cloneDeep(r.value.constValue.value),o.value=Ae.cloneDeep(r.value.constValue.value),a.value=Ae.cloneDeep(n.value.editorOptions.enums))}function h(){n.value.propertyValue.type==="stateMachine"&&(n.value.propertyValue.value=Ae.cloneDeep(r.value.stateMachineValue.value),i.value=Ae.cloneDeep(n.value.editorOptions.stateMachine),n.value.propertyValue.value.name?Ae.cloneDeep(n.value.propertyValue.value.id):(n.value.propertyValue.value={id:"",name:"",exist:""},l.value="否"))}function y(){n.value.propertyValue.type==="dataStates"&&(n.value.propertyValue.value=Ae.cloneDeep(r.value.dataStatesValue.value),p.value=Ae.cloneDeep(n.value.editorOptions.dataStates))}function v(){c.value="",r.value.expressionValue&&(r.value.expressionValue.value="")}function b(){f.value||(l.value=l.value==="否"?"是":"否",n.value.propertyValue.value.exist=l,r.value.stateMachineValue.value.exist=l,w())}function x(){m.value.propertyValue.value&&m.value.propertyValue.value.includes("viewModel.stateMachine")&&(r.value.customValue.value="")}function C(){m.value.propertyName=Ae.cloneDeep(n.value.propertyName),m.value.propertyType=Ae.cloneDeep(n.value.propertyType),m.value.propertyValue=Ae.cloneDeep(n.value.propertyValue),m.value.hasPrefix=Ae.cloneDeep(d)}function w(){if(!f.value)switch(C(),m.value.propertyValue.type){case"const":(m.value.propertyType==="enum"&&m.value.propertyValue.value!==""||m.value.propertyType==="number"&&m.value.propertyValue.value!=null||m.value.propertyType==="string")&&(v(),t.emit("propertyEditorValueChanged",m));break;case"variable":m.value.propertyValue.value.path!==""&&(v(),t.emit("propertyEditorValueChanged",m));break;case"custom":v(),x(),t.emit("propertyEditorValueChanged",m);break;case"expression":c.value&&t.emit("propertyEditorValueChanged",m);break;case"stateMachine":m.value.propertyValue.value.id&&(v(),t.emit("propertyEditorValueChanged",m));break;case"dataStates":if(m.value.propertyValue.value!==""){v(),t.emit("propertyEditorValueChanged",m);break}}}function V(){n.value.propertyValue=r.value[`${u.value.id}Value`],g(),h(),y(),w(),m.value.isNewVariable=!1}return{updateData:V,changeState:b,prefix:d,propertyEditorValueChange:m}}const Gs=e.defineComponent({name:"FPropertyEditor",props:Am,emits:["propertyEditorValueChanged"],setup(t,n){const o=e.ref(ZT),a=e.ref(""),r=e.ref("const"),i=e.ref([]),s=e.ref(!1);let l;const p=e.ref(""),c=e.ref(""),f=e.ref([]);let u;const d=e.ref([]),m=e.ref("是");e.ref("");const g=e.ref(!1),h=e.ref("<span class='f-icon f-icon-more-horizontal'></span>"),y=e.ref(!1),v=e.ref([]),{numberConstValue:b,bindVariableValue:x,dataStatesBindValue:C,dataStatesValueArray:w,constEnumBindValue:V,setValue:N}=KT(o,i,r,u,m,a,g),{updateData:S,changeState:D,prefix:k,propertyEditorValueChange:A}=QT(n,o,V,i,Je,d,u,m,w,a,y,r);function $(){v.value=YT.value.filter(te=>o.value.editorOptions.types.includes(te.id))}function T(){r.value=Ae.cloneDeep(v.value.find(te=>te.id===o.value.propertyValue.type))}function E(){T(),r.value.id==="variable"&&o.value.propertyValue.value===void 0&&(o.value.propertyValue=Ae.cloneDeep(Je.value.variableValue)),Je.value[`${r.value.id}Value`]=Ae.cloneDeep(o.value.propertyValue),N()}function B(te){r.value=Ae.cloneDeep(v.value.find(ce=>ce.label===te[0].label)),r.value.id==="expression"&&(Je.value.expressionValue.value&&(a.value=Je.value.expressionValue.value.value),g.value=!0),r.value.id==="custom"&&Z(),S()}function I(te){V.value=Ae.cloneDeep(te.value),o.value.propertyValue.value=Ae.cloneDeep(te.value),Je.value.constValue.value=Ae.cloneDeep(te.value),S()}function F(te){Je.value.constValue.value=te,S()}function R(te){Je.value.constValue.value=te,S()}function O(){const te=o.value.propertyName,ce=te[0].toUpperCase()+te.substr(1),pe=o.value.controlName,we=o.value.editorOptions.newVariablePrefix||"",He=we?pe[0].toUpperCase()+pe.substr(1):pe[0].toLowerCase()+pe.substr(1);l=`${we}${He}${ce}`,W()}function W(){M(),r.value.id==="variable"&&(x.value=o.value.propertyValue.value.path),G(),c.value!==o.value.propertyValue.value.path&&S()}function M(){var ce;let te=0;(ce=o.value.editorOptions.variables)==null||ce.forEach(pe=>{pe.path!==l?te+=1:(c.value=o.value.propertyValue.value.path,o.value.propertyValue.value=Ae.cloneDeep(pe),Je.value.variableValue.value=Ae.cloneDeep(pe))}),_(te)}function _(te){var ce;te===((ce=o.value.editorOptions.variables)==null?void 0:ce.length)&&(o.value.propertyValue.value.category="local",o.value.propertyValue.value.path=l,o.value.propertyValue.value.field=p,o.value.propertyValue.value.fullPath=l,o.value.propertyValue.value.newVariableType=o.value.editorOptions.newVariableType,A.value.isNewVariable=!0,o.value.editorOptions.variables.push(Ae.cloneDeep(o.value.propertyValue.value)),Je.value.variableValue.value=Ae.cloneDeep(o.value.propertyValue.value))}function H(te){!te||!te.selections||te.selections.length<1||(Je.value.variableValue.value.category=Ae.cloneDeep(te.selections[0].category),Je.value.variableValue.value.path=Ae.cloneDeep(te.selections[0].path),Je.value.variableValue.value.fullPath=Ae.cloneDeep(te.selections[0].fullPath),Je.value.variableValue.value.field=Ae.cloneDeep(te.selections[0].field),x.value=Ae.cloneDeep(te.value),S())}function L(){o.value.propertyValue.value.category="",o.value.propertyValue.value.path="",o.value.propertyValue.value.field="",o.value.propertyValue.value.fullPath="",r.value.id==="variable"&&(x.value=o.value.propertyValue.value.path),S()}function G(){f.value=Ae.cloneDeep(o.value.editorOptions.variables)}const Y=te=>{const ce=o.value.editorOptions.getVariables,pe={showDialog:!0};return ce&&(f.value=ce(),te&&(te.data=f)),Dd(pe)};function z(te){const ce={id:te[0].id,name:te[0].exist,exist:te[0].name};Je.value.stateMachineValue.value=Ae.cloneDeep(ce),m.value=o.value.propertyValue.value.exist==="是"?"是":"否",u=Ae.cloneDeep(te.value),S()}function q(){d.value=Ae.cloneDeep(o.value.editorOptions.stateMachine),m.value=Je.value.stateMachineValue.value.exist==="是"?"是":"否"}const j=new Vo;function Z(){j.pipe($v(700)).subscribe(te=>{Je.value.customValue.value=te,S()})}function U(te){j.next(te)}function X(){}function ie(te){o.value.propertyValue.value=Ae.cloneDeep(te.selections),Je.value.dataStatesValue.value=Ae.cloneDeep(te.selections),S()}function de(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-variable"},[e.createVNode(rt,{class:[{"form-control-select-show":s.value},{"form-control-select-hide":!s.value}],modelValue:x.value,"onUpdate:modelValue":te=>x.value=te,placeholder:"",viewType:"text",enableClear:!0,idField:"path",textField:"fullPath",data:f.value,beforeShow:Y,readonly:y.value,editable:!1,onValueChange:te=>H(te),onClear:L},null),s.value?e.createVNode("div",{class:"f-page-single-property-editor-component-variable-button"},[e.createVNode("button",{title:"variable-button",class:"f-variable-button",onClick:O},[e.createVNode("span",{class:"f-icon f-icon-add",style:"margin:unset;"},null)])]):""])}function ne(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-customize"},[e.withDirectives(e.createVNode("input",{class:"form-control",placeholder:"输入自定义内容","onUpdate:modelValue":te=>Je.value.customValue.value=te,onChange:te=>{U(te)},disabled:y.value},null),[[e.vModelText,Je.value.customValue.value]])])}function oe(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-expression"},[e.createVNode(Mt,{editable:!1,enableClear:!1,readonly:y.value,groupText:h.value,modelValue:a.value,"onUpdate:modelValue":te=>a.value=te,onClickHandle:X},null)])}function ee(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-stateMachine"},[e.createVNode("div",{class:"f-stateMachine-exist",onClick:D},[m.value]),e.createVNode("div",{class:"f-stateMachine-combo"},[e.createVNode(rt,{modelValue:u,"onUpdate:modelValue":te=>u=te,placeholder:"",viewType:"text",enableClear:!1,idField:"id",textField:"name",data:d.value,editable:!1,readonly:y.value,onChange:te=>{z(te)}},null)])])}function K(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-dataStates"},[e.createVNode(rt,{modelValue:C.value,"onUpdate:modelValue":te=>C.value=te,placeholder:"",viewType:"text",enableClear:!1,idField:"value",textField:"name",data:w.value,editable:!1,readonly:y.value,onValueChange:te=>ie(te)},null)])}function se(){return e.withDirectives(e.createVNode("input",{class:"form-control","onUpdate:modelValue":te=>Je.value.constValue.value=te,onChange:te=>{R(te)},disabled:y.value,placeholder:"输入自定义内容"},null),[[e.vModelText,Je.value.constValue.value]])}function ue(){return e.createVNode(rt,{modelValue:V.value,"onUpdate:modelValue":te=>V.value=te,placeholder:"",viewType:"text",enableClear:!1,idField:"key",textField:"value",data:i.value,editable:!1,readonly:y.value,onValueChange:te=>I(te)},null)}function Te(){return e.createVNode(Bt,{canNull:!0,readonly:y.value,modelValue:b.value,"onUpdate:modelValue":te=>b.value=te,onValueChange:te=>{F(te)},class:"f-page-single-property-editor-component-const-number"},null)}function ke(){return e.createVNode("div",{class:"f-page-single-property-editor-component-left-controller"},[e.createVNode(rt,{modelValue:r.value.id,"onUpdate:modelValue":te=>r.value.id=te,placeholder:"",enableClear:!1,"id-field":"id","text-field":"label",data:v.value,editable:!1,readonly:y.value,onChange:te=>B(te)},null)])}function _e(){return e.createVNode("div",{class:"f-page-single-property-editor-component-right-controller"},[r.value.id==="const"?e.createVNode("div",{class:"f-page-single-property-editor-component-right-const"},[o.value.propertyType==="string"?se():"",o.value.propertyType==="enum"?ue():"",o.value.propertyType==="number"?Te():""]):"",r.value.id==="variable"?de():"",r.value.id==="custom"?ne():"",r.value.id==="expression"&&g.value?oe():"",r.value.id==="stateMachine"?ee():"",r.value.id==="dataStates"?K():""])}return e.onMounted(()=>{$(),E(),G(),q(),o.value.hasPrefix&&o.value.hasPrefix===2&&(k.value=!0),o.value.controlName!==void 0&&(s.value=!0)}),()=>e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"f-page-single-property-editor-component clearfix"},[ke(),_e()])])}}),XT={install(t){t.component(Gs.name,Gs)},register(t,n,o){t["property-editor"]=Gs,n["property-editor"]=UT}},JT={install(t){t.component(kr.name,kr)}},eD=e.defineComponent({name:"FRadioButtonDesign",props:hi,emits:[""],setup(t,n){return()=>e.createVNode(e.Fragment,null,null)}}),tD={install(t){t.component(Wo.name,Wo)},register(t,n,o){t["radio-button"]=Wo,n["radio-button"]=wf},registerDesigner(t,n,o){t["radio-button"]=eD,n["radio-button"]=wf}},nD={defaultSpacings:{type:Array,default:[{id:"default",value:"4",name:"系统默认"},{id:"large",value:"20",name:"大(20px)"},{id:"middle",value:"16",name:"中(16px)"},{id:"small",value:"12",name:"小(12px)"},{id:"exsmall",value:"8",name:"超小(8px)"},{id:"none",value:"0",name:"无(0px)"},{id:"custom",value:"custom",name:"自定义"}]},directions:{type:Array,default:[{id:"top",title:"上"},{id:"right",title:"右"},{id:"bottom",title:"下"},{id:"left",title:"左"}]},margins:{type:Array,default:[4,4,4,4]},paddings:{type:Array,default:[4,4,4,4]}};function oD(t,n){const{defaultSpacings:o}=t,{directions:a}=t,r=e.ref(t.margins),i=e.ref(t.paddings),s=e.ref(!1),l=e.ref("default"),p=e.computed(()=>({"f-icon":!0,"mr-1":!0,"f-spacing-editor-icon":!0,"f-icon-arrow-60-right":!s.value,"f-icon-arrow-60-down":s.value})),c=e.computed(()=>({margin:r.value.join("px ")+"px",padding:i.value.join("px ")+"px"}));function f(){s.value=!s.value}function u(h){h[0].name!=="自定义"?(r.value.fill(h[0].value),s.value=!1,e.nextTick(()=>{s.value=!0}),n.emit("valueChanged",c.value)):s.value=!0}function d(){l.value="custom",n.emit("valueChanged",c.value)}function m(){return s.value?e.createVNode("div",{class:"f-spacing-editor-custom-container"},[a.map((h,y)=>e.createVNode("div",null,[e.createVNode("div",{class:"f-spacing-editor-custom"},[e.createVNode("div",{class:"f-spacing-editor-title"},[h.title,e.createTextVNode("间距(px)")]),e.createVNode(Bt,{style:"flex: 1 1 0",min:0,modelValue:r.value[y],"onUpdate:modelValue":v=>r.value[y]=v,onChange:d},null)])]))]):""}function g(){return e.createVNode("div",{class:"f-spacing-editor-container"},[e.createVNode("div",{style:"display: flex"},[e.createVNode("div",{class:"f-spacing-editor-title"},[e.createVNode("div",{class:p.value,onClick:f},null),e.createVNode("div",null,[e.createTextVNode("外间距")])]),e.createVNode(rt,{style:"flex: 1 1 0",data:o,modelValue:l.value,"onUpdate:modelValue":h=>l.value=h,onChange:u},null)]),m()])}return{renderSpacingEditorMargin:g}}function aD(t,n){const{defaultSpacings:o}=t,{directions:a}=t,r=e.ref(t.margins),i=e.ref(t.paddings),s=e.ref(!1),l=e.ref("default"),p=e.computed(()=>({"f-icon":!0,"mr-1":!0,"f-spacing-editor-icon":!0,"f-icon-arrow-60-right":!s.value,"f-icon-arrow-60-down":s.value})),c=e.computed(()=>({margin:r.value.join("px ")+"px",padding:i.value.join("px ")+"px"}));function f(){s.value=!s.value}function u(h){h[0].name!=="自定义"?(i.value.fill(h[0].value),s.value=!1,e.nextTick(()=>{s.value=!0}),n.emit("valueChanged",c.value)):s.value=!0}function d(){l.value="custom",n.emit("valueChanged",c.value)}function m(){return s.value?e.createVNode("div",{class:"f-spacing-editor-custom-container"},[a.map((h,y)=>e.createVNode("div",null,[e.createVNode("div",{class:"f-spacing-editor-custom"},[e.createVNode("div",{class:"f-spacing-editor-title"},[h.title,e.createTextVNode("间距(px)")]),e.createVNode(Bt,{style:"flex: 1 1 0",min:0,modelValue:i.value[y],"onUpdate:modelValue":v=>i.value[y]=v,onChange:d},null)])]))]):""}function g(){return e.createVNode("div",{class:"f-spacing-editor-container"},[e.createVNode("div",{style:"display: flex"},[e.createVNode("div",{class:"f-spacing-editor-title"},[e.createVNode("div",{class:p.value,onClick:f},null),e.createVNode("div",null,[e.createTextVNode("内间距")])]),e.createVNode(rt,{style:"flex: 1 1 0",data:o,modelValue:l.value,"onUpdate:modelValue":h=>l.value=h,onChange:u},null)]),m()])}return{renderSpacingEditorPadding:g}}const $m=e.defineComponent({name:"FSpacingEditor",props:nD,emits:["valueChanged"],setup(t,n){const{renderSpacingEditorMargin:o}=oD(t,n),{renderSpacingEditorPadding:a}=aD(t,n);return()=>e.createVNode("div",null,[o(),a()])}}),rD={install(t){t.component($m.name,$m)}},iD={content:{type:String,default:"top"},contentTemplate:{type:Object},width:{type:String},customClass:{type:String},placement:{type:String,default:"top"},trigger:{type:String,default:"hover"},reference:{type:Object,require:!0},horizontalRelative:{type:String,default:""},verticalRelative:{type:String,default:""}};function sD(t,n){const o=new Map([["top","bottom"],["bottom","top"],["left","right"],["right","left"]]),a=new Map([["top","height"],["bottom","height"],["left","width"],["right","width"]]);function r(s,l){const p=o.get(l)||l;return s.replace(l,p)}function i(s,l,p,c,f){let u=s;const d=s.split("-")[0],m=a.get(d),g=c[m]+f[m];return Math.abs(p[d]-l[d])<g&&(u=r(s,d)),u}return{adjustPlacement:i}}function lD(t,n){function a(i,s,l){let p=!1,c=l;return(s==="left"||s==="top")&&l<=i[s]&&(p=!0,c=i[s]+6),(s==="right"||s==="bottom")&&l>=i[s]&&(p=!0,c=i[s]-6),{overBound:p,fixedValue:c}}function r(i,s,l,p,c,f,u){let d=s.tooltip.left,m=s.tooltip.top,g=s.arrow.left,h=s.arrow.top;const v=i.split("-")[0];if(["top","bottom"].includes(v)){const V=a(l,"left",s.tooltip.left),N=a(l,"right",s.tooltip.left+c.width);d=V.overBound?V.fixedValue:N.overBound?N.fixedValue-c.width:s.tooltip.left,g=V.overBound?c.width-(d+c.width-p.right)-u.width:N.overBound?p.left-d:s.arrow.left}const b=a(l,"top",s.tooltip.top),x=a(l,"bottom",s.tooltip.top+c.height);return m=b.overBound?b.fixedValue:x.overBound?x.fixedValue-c.height:s.tooltip.top,h=b.overBound?s.arrow.top:x.overBound?c.height-(m+c.height-p.top):s.arrow.top,{arrow:{left:g,top:h},tooltip:{left:d,top:m}}}return{adjustPosition:r}}function cD(t,n){function a(s,l,p,c,f){const u=s.split("-"),d=u[0],m=u[1]||"middle",g=["top","bottom"].includes(d)?m==="middle"?(c.width-f.width)/2:m==="right"?c.width-f.width-6:6:0,h=["left","right"].includes(d)?m==="middle"?(c.height-f.height)/2:m==="bottom"?c.height-f.height-6:6:0,y=d==="left"?c.width+f.width:0,v=d==="top"?c.height+f.height:0;return{left:y+g,top:v+h,right:0}}function r(s,l,p,c,f){const u=s.split("-"),d=u[0],m=u[1]||"middle",g=(p.width-c.width)/2,h=(p.height-c.height)/2,y=d==="right"?l.right:l.left,v=d==="bottom"?l.bottom:l.top,b=d==="top"?0-h-c.height-f.height:d==="bottom"?0-h+f.height:0,x=["left","right"].includes(d)?m==="middle"?(l.height-c.height)/2:m==="bottom"?l.height-c.height:0:0,C=d==="left"?0-g-c.width-f.width:d==="right"?0-g+f.width:0,w=["top","bottom"].includes(d)?m==="middle"?(l.width-c.width)/2:m==="right"?l.width-c.width:0:0,V=v+b+x;return{left:y+C+w,top:V}}function i(s,l,p,c,f){const u=r(s,l,p,c,f);return{arrow:a(s,l,p,c,f),tooltip:u}}return{calculate:i}}function dD(t,n){const o=e.ref(t.horizontalRelative),a=e.ref(t.verticalRelative);function r(s){return typeof s=="string"?document.querySelector(s):s}function i(){let s=document.documentElement.clientWidth,l=document.documentElement.clientHeight,p=0,c=0,f=0,u=0,d=l-p,m=s-c;return o.value&&({left:c,right:s,x:f,width:m}=r(o.value).getBoundingClientRect()),a.value&&({bottom:l,top:p,y:u,height:d}=r(a.value).getBoundingClientRect()),{top:p,left:c,right:s,bottom:l,height:d,width:m,x:f,y:u}}return{getRelativeElementBound:i}}function uD(t,n,o,a,r,i){const s=e.ref(t.placement),{getRelativeElementBound:l}=dD(t),{calculate:p}=cD(),{adjustPlacement:c}=sD(),{adjustPosition:f}=lD(),u=e.computed(()=>s.value.split("-")[0]),d=e.computed(()=>{const m=l();s.value=c(s.value,m,o,a,i);const g=p(s.value,o,a,r,i);return f(s.value,g,m,o,a,r,i)});return{tooltipPlacement:u,tooltipPosition:d}}const Us=e.defineComponent({name:"FTooltip",props:iD,emits:["click"],setup(t,n){const o=e.ref(),a=e.ref(),r=e.ref(),i=e.ref(),s=e.ref(t.placement.split("-")[0]),l=e.computed(()=>{const w={tooltip:!0,show:!0},V=`bs-tooltip-${s.value}`;return w[V]=!0,w}),{scrollLeft:p,scrollTop:c}=document.documentElement,f=e.computed(()=>t.content&&!t.contentTemplate),u=e.computed(()=>t.content),d=e.ref("0px"),m=e.ref("0px");e.ref("");const g=e.computed(()=>({left:d.value,top:m.value})),h=e.ref(""),y=e.ref(""),v=e.computed(()=>({left:h.value,top:y.value})),b=e.computed(()=>({"tooltip-inner":!0,"tooltip-inner-lg":r.value&&r.value&&r.value.scrollHeight>r.value.clientHeight})),x=e.computed(()=>{const w={};return t.width&&Object.assign(w,{width:t.width,"max-width":"none"}),w});e.onMounted(()=>{if(!f.value&&t.contentTemplate&&i.value&&i.value.appendChild(t.contentTemplate),o.value&&a.value&&r.value&&t.reference){const{tooltipPlacement:w,tooltipPosition:V}=uD(t,n,t.reference.getBoundingClientRect(),a.value.getBoundingClientRect(),r.value.getBoundingClientRect(),o.value.getBoundingClientRect());d.value=`${V.value.tooltip.left+p}px`,m.value=`${V.value.tooltip.top+c}px`,h.value=`${V.value.arrow.left}px`,y.value=`${V.value.arrow.top}px`,s.value=w.value}});function C(w){n.emit("click",w)}return()=>e.createVNode("div",{ref:a,class:l.value,style:g.value,onClick:C},[e.createVNode("div",{ref:o,class:"arrow",style:v.value},null),e.createVNode("div",{ref:r,class:b.value,style:x.value},[e.createVNode("div",{class:"tooltip-tmpl"},[f.value&&e.createVNode("div",{class:"tooltip-text",innerHTML:u.value},null),!f.value&&e.createVNode("div",{class:"tooltip-text",ref:i},null)])])])}});function fD(t,n){const o=document.createElement("div");t.customClass&&(o.className=t.customClass);const a=e.createApp({setup(){return e.onUnmounted(()=>{document.body.removeChild(o)}),()=>e.createVNode(Us,e.mergeProps(t,{onClick:a.unmount}),null)}});return document.body.appendChild(o),a.mount(o),a}function Em(t){const n=e.reactive({...t});return fD(n)}function pD(t,n){let o;t.addEventListener("mouseenter",a=>{if(a.stopPropagation(),!o){const r=t.dataset.tooltip&&JSON.parse(t.dataset.tooltip)||{},i=Object.assign({reference:t,contentTemplate:n.value.contentTemplate},r);o=Em(i)}}),t.addEventListener("mouseleave",a=>{a.stopPropagation(),o&&(o.unmount(),o=null)})}function Bm(t,n){t.stopPropagation(),n&&(n.unmount(),n=null)}function mD(t,n){let o;t.addEventListener("click",a=>{if(a.stopPropagation(),!o){const r=t.dataset.tooltip&&JSON.parse(t.dataset.tooltip)||{},i=Object.assign({trigger:"hover",reference:t},r);o=Em(i)}}),document.body.addEventListener("click",a=>{Bm(a,o),o=null})}function Fm(t,n){if(!n.value)t.dataset.tooltip="";else{const{contentTemplate:o,...a}=n.value;t.dataset.tooltip=JSON.stringify(a)}}const hD={mounted:(t,n,o)=>{switch(Fm(t,n),n.value.trigger){case"click":{mD(t);break}default:pD(t,n)}},unMounted:(t,n,o)=>{n.value.trigger==="click"&&document.body.removeEventListener("click",()=>Bm)},beforeUpdate:(t,n)=>{Fm(t,n)}},gD={install(t){t.component(Us.name,Us),t.directive("tooltip",hD)}},yD=new Map([["appearance",ge]]);function bD(t,n,o){return n}const vD={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/expression-editor.schema.json",title:"expression-editor",description:"A Farris Expression Editor Component",type:"object",properties:{id:{description:"The unique identifier for a Expression Editor",type:"string"},type:{description:"The type string of Expression Editor component",type:"string",default:"expression-editor"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}}},required:["id","type"]},xD={title:"expression-editor",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"类型",title:"类型",type:"string",readonly:!0}}}}},Ys={},Im=me(Ys,vD,yD,bD,xD),Zs=e.defineComponent({name:"FExpressionEditor",props:Ys,emits:[],setup(t,n){const o=e.ref();return e.onMounted(()=>{}),()=>e.createVNode("div",{ref:o,class:"d-flex h-100 f-utils-flex-column",style:"min-height:450px"},[e.createVNode(e.resolveComponent("f-layout"),{class:"flex-column"},{default:()=>[e.createVNode(e.resolveComponent("f-layout-pane"),{"custom-class":"position-relative",position:"top",minHeight:120},{default:()=>[e.createVNode("div",{class:"f-utils-absolute-all bg-info",style:"opacity:0.2;z-index: -1;"},null),e.createVNode("p",null,[e.createTextVNode("头部区域")])]}),e.createVNode(e.resolveComponent("f-layout-pane"),{position:"center"},{default:()=>[e.createVNode(e.resolveComponent("f-layout"),null,{default:()=>[e.createVNode(e.resolveComponent("f-layout-pane"),{position:"left",minWidth:200,width:400},{default:()=>[e.createVNode("div",{class:"f-utils-absolute-all bg-info",style:"opacity:0.2;z-index: -1;"},null),e.createVNode("p",null,[e.createTextVNode("左侧区域")])]}),e.createVNode(e.resolveComponent("f-layout-pane"),{position:"center"},{default:()=>[e.createVNode("div",{class:"f-utils-absolute-all bg-danger",style:"opacity:0.2;z-index:-1"},null),e.createVNode("p",null,[e.createTextVNode("右侧区域")])]})]})]})]})])}}),CD=e.defineComponent({name:"FExpressionEditorDesign",props:Ys,emits:[],setup(t,n){return()=>e.createVNode(e.Fragment,null,[e.createTextVNode("expression editor design")])}}),wD={install(t){t.component(Zs.name,Zs)},register(t,n,o){t["expression-editor"]=Zs,n["expression-editor"]=Im},registerDesigner(t,n,o){t["expression-editor"]=CD,n["expression-editor"]=Im}};return{install(t){t.use(sl).use(dl).use(G2).use(U2).use(Oc).use(Fc).use(Rc).use(K2).use(Lc).use(Yc).use(Bd).use(Zc).use(tT).use(Xc).use(Nw).use(Id).use(zd).use(jd).use(iT).use(oT).use(Zd).use(pm).use(cT).use(hT).use(BT).use(cu).use(ru).use(fu).use(pu).use(xu).use(wu).use(ku).use(RT).use(Eu).use(Fu).use(V1).use($h).use(Mu).use(s1).use(Ru).use(Lu).use(Hu).use(Ku).use(Yu).use(rf).use(jT).use(lf).use(XT).use(JT).use(ff).use(vf).use(Nf).use(zu).use(pf).use(tD).use(hf).use(Df).use(kf).use($f).use(rD).use(Mf).use(Pf).use(_f).use(Rf).use(Lf).use(Wf).use(Yf).use(gD).use(Zf).use(JC).use(Xf).use(fp).use(hp).use(sm).use(wD)}}});
|