import{Q as q,R as tt,M as B,g as et,i as V,r as C,o as nt,c as rt,a as M,b as w,w as F,d as ot}from"./index.15fc886a.js";var z={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */(function(A,E){(function(S,h){A.exports=h()})(q,function(){return function(){var b={686:function(u,a,t){t.d(a,{default:function(){return Z}});var c=t(279),s=t.n(c),f=t(370),y=t.n(f),v=t(817),g=t.n(v);function d(i){try{return document.execCommand(i)}catch{return!1}}var m=function(n){var e=g()(n);return d("cut"),e},p=m;function x(i){var n=document.documentElement.getAttribute("dir")==="rtl",e=document.createElement("textarea");e.style.fontSize="12pt",e.style.border="0",e.style.padding="0",e.style.margin="0",e.style.position="absolute",e.style[n?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return e.style.top="".concat(r,"px"),e.setAttribute("readonly",""),e.value=i,e}var P=function(n,e){var r=x(n);e.container.appendChild(r);var o=g()(r);return d("copy"),r.remove(),o},H=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},r="";return typeof n=="string"?r=P(n,e):n instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(n==null?void 0:n.type)?r=P(n.value,e):(r=g()(n),d("copy")),r},L=H;function O(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(e){return typeof e}:O=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(i)}var I=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.action,r=e===void 0?"copy":e,o=n.container,l=n.target,_=n.text;if(r!=="copy"&&r!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(l!==void 0)if(l&&O(l)==="object"&&l.nodeType===1){if(r==="copy"&&l.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(r==="cut"&&(l.hasAttribute("readonly")||l.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(_)return L(_,{container:o});if(l)return r==="cut"?p(l):L(l,{container:o})},U=I;function T(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(e){return typeof e}:T=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(i)}function Y(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function j(i,n){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function k(i){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(i)}function R(i,n){var e="data-clipboard-".concat(i);if(!!n.hasAttribute(e))return n.getAttribute(e)}var W=function(i){Q(e,i);var n=X(e);function e(r,o){var l;return Y(this,e),l=n.call(this),l.resolveOptions(o),l.listenClick(r),l}return G(e,[{key:"resolveOptions",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof o.action=="function"?o.action:this.defaultAction,this.target=typeof o.target=="function"?o.target:this.defaultTarget,this.text=typeof o.text=="function"?o.text:this.defaultText,this.container=T(o.container)==="object"?o.container:document.body}},{key:"listenClick",value:function(o){var l=this;this.listener=y()(o,"click",function(_){return l.onClick(_)})}},{key:"onClick",value:function(o){var l=o.delegateTarget||o.currentTarget,_=this.action(l)||"copy",D=U({action:_,container:this.container,target:this.target(l),text:this.text(l)});this.emit(D?"success":"error",{action:_,text:D,trigger:l,clearSelection:function(){l&&l.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(o){return R("action",o)}},{key:"defaultTarget",value:function(o){var l=R("target",o);if(l)return document.querySelector(l)}},{key:"defaultText",value:function(o){return R("text",o)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return L(o,l)}},{key:"cut",value:function(o){return p(o)}},{key:"isSupported",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],l=typeof o=="string"?[o]:o,_=!!document.queryCommandSupported;return l.forEach(function(D){_=_&&!!document.queryCommandSupported(D)}),_}}]),e}(s()),Z=W},828:function(u){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}function c(s,f){for(;s&&s.nodeType!==a;){if(typeof s.matches=="function"&&s.matches(f))return s;s=s.parentNode}}u.exports=c},438:function(u,a,t){var c=t(828);function s(v,g,d,m,p){var x=y.apply(this,arguments);return v.addEventListener(d,x,p),{destroy:function(){v.removeEventListener(d,x,p)}}}function f(v,g,d,m,p){return typeof v.addEventListener=="function"?s.apply(null,arguments):typeof d=="function"?s.bind(null,document).apply(null,arguments):(typeof v=="string"&&(v=document.querySelectorAll(v)),Array.prototype.map.call(v,function(x){return s(x,g,d,m,p)}))}function y(v,g,d,m){return function(p){p.delegateTarget=c(p.target,g),p.delegateTarget&&m.call(v,p)}}u.exports=f},879:function(u,a){a.node=function(t){return t!==void 0&&t instanceof HTMLElement&&t.nodeType===1},a.nodeList=function(t){var c=Object.prototype.toString.call(t);return t!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in t&&(t.length===0||a.node(t[0]))},a.string=function(t){return typeof t=="string"||t instanceof String},a.fn=function(t){var c=Object.prototype.toString.call(t);return c==="[object Function]"}},370:function(u,a,t){var c=t(879),s=t(438);function f(d,m,p){if(!d&&!m&&!p)throw new Error("Missing required arguments");if(!c.string(m))throw new TypeError("Second argument must be a String");if(!c.fn(p))throw new TypeError("Third argument must be a Function");if(c.node(d))return y(d,m,p);if(c.nodeList(d))return v(d,m,p);if(c.string(d))return g(d,m,p);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function y(d,m,p){return d.addEventListener(m,p),{destroy:function(){d.removeEventListener(m,p)}}}function v(d,m,p){return Array.prototype.forEach.call(d,function(x){x.addEventListener(m,p)}),{destroy:function(){Array.prototype.forEach.call(d,function(x){x.removeEventListener(m,p)})}}}function g(d,m,p){return s(document.body,d,m,p)}u.exports=f},817:function(u){function a(t){var c;if(t.nodeName==="SELECT")t.focus(),c=t.value;else if(t.nodeName==="INPUT"||t.nodeName==="TEXTAREA"){var s=t.hasAttribute("readonly");s||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),s||t.removeAttribute("readonly"),c=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var f=window.getSelection(),y=document.createRange();y.selectNodeContents(t),f.removeAllRanges(),f.addRange(y),c=f.toString()}return c}u.exports=a},279:function(u){function a(){}a.prototype={on:function(t,c,s){var f=this.e||(this.e={});return(f[t]||(f[t]=[])).push({fn:c,ctx:s}),this},once:function(t,c,s){var f=this;function y(){f.off(t,y),c.apply(s,arguments)}return y._=c,this.on(t,y,s)},emit:function(t){var c=[].slice.call(arguments,1),s=((this.e||(this.e={}))[t]||[]).slice(),f=0,y=s.length;for(f;fA});b.on("success",()=>{ut(),b.destroy()}),b.on("error",()=>{at(),b.destroy()}),b.onClick(E)}const st={class:"app-container"},lt={class:"app-container-inner"},ft=M("div",{style:{"margin-bottom":"10px"}},"\u8F93\u5165\u5185\u5BB9\uFF0C\u5E76\u70B9\u51FB\u590D\u5236\u6309\u94AE",-1),dt=M("div",{style:{"margin-bottom":"10px"}},"\u590D\u5236\u6210\u529F\u540E\u53EF\u5728\u8FD9\u7C98\u8D34\u6D4B\u8BD5",-1),vt=et({__name:"index",setup(A){const E=V("https://github.com/zouzhibin/vue-admin-perfect"),b=V(""),S=(h,u)=>{ct(h,u)};return(h,u)=>{const a=C("el-input"),t=C("document-copy"),c=C("el-icon"),s=C("el-button"),f=C("el-card");return nt(),rt("div",st,[M("div",lt,[w(f,{style:{"margin-bottom":"20px"}},{default:F(()=>[ft,w(a,{modelValue:E.value,"onUpdate:modelValue":u[0]||(u[0]=y=>E.value=y),placeholder:"\u8BF7\u8F93\u5165",style:{width:"400px","max-width":"100%"}},null,8,["modelValue"]),w(s,{type:"primary",onClick:u[1]||(u[1]=y=>S(E.value,y))},{default:F(()=>[w(c,{style:{"margin-right":"6px"}},{default:F(()=>[w(t)]),_:1}),ot(" \u590D\u5236 ")]),_:1})]),_:1}),w(f,null,{default:F(()=>[dt,w(a,{modelValue:b.value,"onUpdate:modelValue":u[2]||(u[2]=y=>b.value=y),placeholder:"\u8BF7\u8F93\u5165",style:{width:"400px","max-width":"100%"}},null,8,["modelValue"])]),_:1})])])}}});export{vt as default};