@gkd-kit/inspect 0.0.1732157681689 → 0.0.1732198253964

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.
Files changed (38) hide show
  1. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-CjXPRV-z.js → ActionCard.vue_vue_type_script_setup_true_lang-z1Cgyjmi.js} +2 -2
  2. package/dist/assets/{ActionCard.vue_vue_type_script_setup_true_lang-CjXPRV-z.js.map → ActionCard.vue_vue_type_script_setup_true_lang-z1Cgyjmi.js.map} +1 -1
  3. package/dist/assets/{DevicePage-7i5ZtJ70.js → DevicePage-DoTJevqb.js} +2 -2
  4. package/dist/assets/{DevicePage-7i5ZtJ70.js.map → DevicePage-DoTJevqb.js.map} +1 -1
  5. package/dist/assets/{HomePage-DO4mjOs4.js → HomePage-CgNLM1Tf.js} +2 -2
  6. package/dist/assets/{HomePage-DO4mjOs4.js.map → HomePage-CgNLM1Tf.js.map} +1 -1
  7. package/dist/assets/{ImportPage-8sN9jZYH.js → ImportPage-CoaxZ7Hf.js} +2 -2
  8. package/dist/assets/{ImportPage-8sN9jZYH.js.map → ImportPage-CoaxZ7Hf.js.map} +1 -1
  9. package/dist/assets/{SelectorPage-BFFhrAJ-.js → SelectorPage-C-Wak5En.js} +2 -2
  10. package/dist/assets/SelectorPage-C-Wak5En.js.map +1 -0
  11. package/dist/assets/SnapshotPage-o_3nDIwM.js +277 -0
  12. package/dist/assets/SnapshotPage-o_3nDIwM.js.map +1 -0
  13. package/dist/assets/{TrackGraph-74duzQ5y.js → TrackGraph-DLJlKCfR.js} +2 -2
  14. package/dist/assets/{TrackGraph-74duzQ5y.js.map → TrackGraph-DLJlKCfR.js.map} +1 -1
  15. package/dist/assets/{_404Page-DPk80ZVB.js → _404Page-CM-79sbg.js} +2 -2
  16. package/dist/assets/{_404Page-DPk80ZVB.js.map → _404Page-CM-79sbg.js.map} +1 -1
  17. package/dist/assets/chunk-CR_dKP9I.js +3 -0
  18. package/dist/assets/{chunk-DsTh7P_l.js.map → chunk-CR_dKP9I.js.map} +1 -1
  19. package/dist/assets/{dayjs.min-uszStO0N.js → dayjs.min-Bh1-yVGX.js} +2 -2
  20. package/dist/assets/{dayjs.min-uszStO0N.js.map → dayjs.min-Bh1-yVGX.js.map} +1 -1
  21. package/dist/assets/{error-DCJk3TnZ.js → error-CJD2_ssy.js} +2 -2
  22. package/dist/assets/{error-DCJk3TnZ.js.map → error-CJD2_ssy.js.map} +1 -1
  23. package/dist/assets/{import-BBKQB8ur.js → import-BSDk76ML.js} +2 -2
  24. package/dist/assets/{import-BBKQB8ur.js.map → import-BSDk76ML.js.map} +1 -1
  25. package/dist/assets/{index-BpQ4JJ-L.js → index-ByNFJpwC.js} +8 -8
  26. package/dist/assets/{index-BpQ4JJ-L.js.map → index-ByNFJpwC.js.map} +1 -1
  27. package/dist/assets/{jszip.min-AipjUbFi.js → jszip.min-CDKDkhLr.js} +2 -2
  28. package/dist/assets/{jszip.min-AipjUbFi.js.map → jszip.min-CDKDkhLr.js.map} +1 -1
  29. package/dist/assets/{snapshot-DnVnjC_r.js → snapshot-D45lG0Mv.js} +2 -2
  30. package/dist/assets/{snapshot-DnVnjC_r.js.map → snapshot-D45lG0Mv.js.map} +1 -1
  31. package/dist/assets/{table-Bd-pILJA.js → table-BnTmp5rf.js} +2 -2
  32. package/dist/assets/{table-Bd-pILJA.js.map → table-BnTmp5rf.js.map} +1 -1
  33. package/dist/index.html +3 -3
  34. package/package.json +1 -1
  35. package/dist/assets/SelectorPage-BFFhrAJ-.js.map +0 -1
  36. package/dist/assets/SnapshotPage-BN6ltCdt.js +0 -277
  37. package/dist/assets/SnapshotPage-BN6ltCdt.js.map +0 -1
  38. package/dist/assets/chunk-DsTh7P_l.js +0 -3
@@ -1,4 +1,4 @@
1
- import{ag as mt,d as gt,aR as wt,a3 as yt,h as J,u as qe,aa as bt,m as $,q as xt,t as Re,aq as Oe,v as C,w as kt,aS as Bt,X as se,ad as Et,aT as Pt,a as _e,b as ae,e as Ue,j as Je,r as Ct,$ as Tt,aU as St,aV as At,y as ze,V as Ke,K as w,aM as X,z as Ye,Q as P,Y as Ft,aW as D,aL as jt,aP as ce,aF as K,aX as Rt,aY as Ot,at as _t,H as S,I as Ie,M as x,L as g,J as E,S as N,av as j,aE as Ut,aO as zt,W as Le}from"./index-BpQ4JJ-L.js";import{y as It,z as De,c as Qe,A as Lt,_ as Dt,u as H,N as Mt,b as Nt,n as Ht}from"./dayjs.min-uszStO0N.js";import{e as Wt,p as et,b as tt,a as $t}from"./snapshot-DnVnjC_r.js";import{J as ue}from"./chunk-DsTh7P_l.js";const Vt={iconSize:"22px"};function Gt(t){const{fontSize:e,warningColor:a}=t;return Object.assign(Object.assign({},Vt),{fontSize:e,iconColor:a})}const Xt=mt({name:"Popconfirm",common:gt,peers:{Button:wt,Popover:It},self:Gt}),nt=yt("n-popconfirm"),at={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},Me=Bt(at),Zt=J({name:"NPopconfirmPanel",props:at,setup(t){const{localeRef:e}=De("Popconfirm"),{inlineThemeDisabled:a}=qe(),{mergedClsPrefixRef:n,mergedThemeRef:o,props:r}=bt(nt),f=$(()=>{const{common:{cubicBezierEaseInOut:l},self:{fontSize:i,iconSize:s,iconColor:h}}=o.value;return{"--n-bezier":l,"--n-font-size":i,"--n-icon-size":s,"--n-icon-color":h}}),p=a?xt("popconfirm-panel",void 0,f,r):void 0;return Object.assign(Object.assign({},De("Popconfirm")),{mergedClsPrefix:n,cssVars:a?void 0:f,localizedPositiveText:$(()=>t.positiveText||e.value.positiveText),localizedNegativeText:$(()=>t.negativeText||e.value.negativeText),positiveButtonProps:Re(r,"positiveButtonProps"),negativeButtonProps:Re(r,"negativeButtonProps"),handlePositiveClick(l){t.onPositiveClick(l)},handleNegativeClick(l){t.onNegativeClick(l)},themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender})},render(){var t;const{mergedClsPrefix:e,showIcon:a,$slots:n}=this,o=Oe(n.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&C(se,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&C(se,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(t=this.onRender)===null||t===void 0||t.call(this),C("div",{class:[`${e}-popconfirm__panel`,this.themeClass],style:this.cssVars},kt(n.default,r=>a||r?C("div",{class:`${e}-popconfirm__body`},a?C("div",{class:`${e}-popconfirm__icon`},Oe(n.icon,()=>[C(Et,{clsPrefix:e},{default:()=>C(Pt,null)})])):null,r):null),o?C("div",{class:[`${e}-popconfirm__action`]},o):null)}}),qt=_e("popconfirm",[ae("body",`
1
+ import{ag as mt,d as gt,aR as wt,a3 as yt,h as J,u as qe,aa as bt,m as $,q as xt,t as Re,aq as Oe,v as C,w as kt,aS as Bt,X as se,ad as Et,aT as Pt,a as _e,b as ae,e as Ue,j as Je,r as Ct,$ as Tt,aU as St,aV as At,y as ze,V as Ke,K as w,aM as X,z as Ye,Q as P,Y as Ft,aW as D,aL as jt,aP as ce,aF as K,aX as Rt,aY as Ot,at as _t,H as S,I as Ie,M as x,L as g,J as E,S as N,av as j,aE as Ut,aO as zt,W as Le}from"./index-ByNFJpwC.js";import{y as It,z as De,c as Qe,A as Lt,_ as Dt,u as H,N as Mt,b as Nt,n as Ht}from"./dayjs.min-Bh1-yVGX.js";import{e as Wt,p as et,b as tt,a as $t}from"./snapshot-D45lG0Mv.js";import{J as ue}from"./chunk-CR_dKP9I.js";const Vt={iconSize:"22px"};function Gt(t){const{fontSize:e,warningColor:a}=t;return Object.assign(Object.assign({},Vt),{fontSize:e,iconColor:a})}const Xt=mt({name:"Popconfirm",common:gt,peers:{Button:wt,Popover:It},self:Gt}),nt=yt("n-popconfirm"),at={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},Me=Bt(at),Zt=J({name:"NPopconfirmPanel",props:at,setup(t){const{localeRef:e}=De("Popconfirm"),{inlineThemeDisabled:a}=qe(),{mergedClsPrefixRef:n,mergedThemeRef:o,props:r}=bt(nt),f=$(()=>{const{common:{cubicBezierEaseInOut:l},self:{fontSize:i,iconSize:s,iconColor:h}}=o.value;return{"--n-bezier":l,"--n-font-size":i,"--n-icon-size":s,"--n-icon-color":h}}),p=a?xt("popconfirm-panel",void 0,f,r):void 0;return Object.assign(Object.assign({},De("Popconfirm")),{mergedClsPrefix:n,cssVars:a?void 0:f,localizedPositiveText:$(()=>t.positiveText||e.value.positiveText),localizedNegativeText:$(()=>t.negativeText||e.value.negativeText),positiveButtonProps:Re(r,"positiveButtonProps"),negativeButtonProps:Re(r,"negativeButtonProps"),handlePositiveClick(l){t.onPositiveClick(l)},handleNegativeClick(l){t.onNegativeClick(l)},themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender})},render(){var t;const{mergedClsPrefix:e,showIcon:a,$slots:n}=this,o=Oe(n.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&C(se,Object.assign({size:"small",onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&C(se,Object.assign({size:"small",type:"primary",onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(t=this.onRender)===null||t===void 0||t.call(this),C("div",{class:[`${e}-popconfirm__panel`,this.themeClass],style:this.cssVars},kt(n.default,r=>a||r?C("div",{class:`${e}-popconfirm__body`},a?C("div",{class:`${e}-popconfirm__icon`},Oe(n.icon,()=>[C(Et,{clsPrefix:e},{default:()=>C(Pt,null)})])):null,r):null),o?C("div",{class:[`${e}-popconfirm__action`]},o):null)}}),qt=_e("popconfirm",[ae("body",`
2
2
  font-size: var(--n-font-size);
3
3
  display: flex;
4
4
  align-items: center;
@@ -22,4 +22,4 @@ import{ag as mt,d as gt,aR as wt,a3 as yt,h as J,u as qe,aa as bt,m as $,q as xt
22
22
  *
23
23
  * Date: 2023-02-28T14:09:41.732Z
24
24
  */function We(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),a.push.apply(a,n)}return a}function W(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?We(Object(a),!0).forEach(function(n){ln(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):We(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}function rn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $e(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rt(n.key),n)}}function sn(t,e,a){return e&&$e(t.prototype,e),a&&$e(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}function ln(t,e,a){return e=rt(e),e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Z(){return Z=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},Z.apply(this,arguments)}function cn(t,e){if(typeof t!="object"||t===null)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var n=a.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rt(t){var e=cn(t,"string");return typeof e=="symbol"?e:String(e)}var st={exports:{}};(function(t){typeof window>"u"||function(e){var a=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,n=e.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=n&&e.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),r=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,f=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,p=(n||r)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(l){var i,s,h,c,u,d,v,m,B;if(i=l.match(f),!i)throw new Error("invalid data URI");for(s=i[2]?i[1]:"text/plain"+(i[3]||";charset=US-ASCII"),h=!!i[4],c=l.slice(i[0].length),h?u=atob(c):u=decodeURIComponent(c),d=new ArrayBuffer(u.length),v=new Uint8Array(d),m=0;m<u.length;m+=1)v[m]=u.charCodeAt(m);return n?new Blob([o?v:d],{type:s}):(B=new r,B.append(d),B.getBlob(s))};e.HTMLCanvasElement&&!a.toBlob&&(a.mozGetAsFile?a.toBlob=function(l,i,s){var h=this;setTimeout(function(){s&&a.toDataURL&&p?l(p(h.toDataURL(i,s))):l(h.mozGetAsFile("blob",i))})}:a.toDataURL&&p&&(a.msToBlob?a.toBlob=function(l,i,s){var h=this;setTimeout(function(){(i&&i!=="image/png"||s)&&a.toDataURL&&p?l(p(h.toDataURL(i,s))):l(h.msToBlob(i))})}:a.toBlob=function(l,i,s){var h=this;setTimeout(function(){l(p(h.toDataURL(i,s)))})})),t.exports?t.exports=p:e.dataURLtoBlob=p}(window)})(st);var Ve=st.exports,un=function(e){return typeof Blob>"u"?!1:e instanceof Blob||Object.prototype.toString.call(e)==="[object Blob]"},Ge={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},pn=typeof window<"u"&&typeof window.document<"u",A=pn?window:{},q=function(e){return e>0&&e<1/0},fn=Array.prototype.slice;function pe(t){return Array.from?Array.from(t):fn.call(t)}var dn=/^image\/.+$/;function le(t){return dn.test(t)}function hn(t){var e=le(t)?t.substr(6):"";return e==="jpeg"&&(e="jpg"),".".concat(e)}var lt=String.fromCharCode;function vn(t,e,a){var n="",o;for(a+=e,o=e;o<a;o+=1)n+=lt(t.getUint8(o));return n}var mn=A.btoa;function Xe(t,e){for(var a=[],n=8192,o=new Uint8Array(t);o.length>0;)a.push(lt.apply(null,pe(o.subarray(0,n)))),o=o.subarray(n);return"data:".concat(e,";base64,").concat(mn(a.join("")))}function gn(t){var e=new DataView(t),a;try{var n,o,r;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var f=e.byteLength,p=2;p+1<f;){if(e.getUint8(p)===255&&e.getUint8(p+1)===225){o=p;break}p+=1}if(o){var l=o+4,i=o+10;if(vn(e,l,4)==="Exif"){var s=e.getUint16(i);if(n=s===18761,(n||s===19789)&&e.getUint16(i+2,n)===42){var h=e.getUint32(i+4,n);h>=8&&(r=i+h)}}}if(r){var c=e.getUint16(r,n),u,d;for(d=0;d<c;d+=1)if(u=r+d*12+2,e.getUint16(u,n)===274){u+=8,a=e.getUint16(u,n),e.setUint16(u,1,n);break}}}catch{a=1}return a}function wn(t){var e=0,a=1,n=1;switch(t){case 2:a=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,a=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:a,scaleY:n}}var yn=/\.\d*(?:0|9){12}\d*$/;function Ze(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return yn.test(t)?Math.round(t*e)/e:t}function M(t){var e=t.aspectRatio,a=t.height,n=t.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",r=q(n),f=q(a);if(r&&f){var p=a*e;(o==="contain"||o==="none")&&p>n||o==="cover"&&p<n?a=n/e:n=a*e}else r?a=n/e:f&&(n=a*e);return{width:n,height:a}}function bn(t){for(var e=pe(new Uint8Array(t)),a=e.length,n=[],o=0;o+3<a;){var r=e[o],f=e[o+1];if(r===255&&f===218)break;if(r===255&&f===216)o+=2;else{var p=e[o+2]*256+e[o+3],l=o+p+2,i=e.slice(o,l);n.push(i),o=l}}return n.reduce(function(s,h){return h[0]===255&&h[1]===225?s.concat(h):s},[])}function xn(t,e){var a=pe(new Uint8Array(t));if(a[2]!==255||a[3]!==224)return t;var n=a[4]*256+a[5],o=[255,216].concat(e,a.slice(4+n));return new Uint8Array(o)}var kn=A.ArrayBuffer,re=A.FileReader,R=A.URL||A.webkitURL,Bn=/\.\w+$/,En=A.Compressor,Pn=function(){function t(e,a){rn(this,t),this.file=e,this.exif=[],this.image=new Image,this.options=W(W({},Ge),a),this.aborted=!1,this.result=null,this.init()}return sn(t,[{key:"init",value:function(){var a=this,n=this.file,o=this.options;if(!un(n)){this.fail(new Error("The first argument must be a File or Blob object."));return}var r=n.type;if(!le(r)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!R||!re){this.fail(new Error("The current browser does not support image compression."));return}kn||(o.checkOrientation=!1,o.retainExif=!1);var f=r==="image/jpeg",p=f&&o.checkOrientation,l=f&&o.retainExif;if(R&&!p&&!l)this.load({url:R.createObjectURL(n)});else{var i=new re;this.reader=i,i.onload=function(s){var h=s.target,c=h.result,u={},d=1;p&&(d=gn(c),d>1&&Z(u,wn(d))),l&&(a.exif=bn(c)),p||l?!R||d>1?u.url=Xe(c,r):u.url=R.createObjectURL(n):u.url=c,a.load(u)},i.onabort=function(){a.fail(new Error("Aborted to read the image with FileReader."))},i.onerror=function(){a.fail(new Error("Failed to read the image with FileReader."))},i.onloadend=function(){a.reader=null},p||l?i.readAsArrayBuffer(n):i.readAsDataURL(n)}}},{key:"load",value:function(a){var n=this,o=this.file,r=this.image;r.onload=function(){n.draw(W(W({},a),{},{naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight}))},r.onabort=function(){n.fail(new Error("Aborted to load the image."))},r.onerror=function(){n.fail(new Error("Failed to load the image."))},A.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(A.navigator.userAgent)&&(r.crossOrigin="anonymous"),r.alt=o.name,r.src=a.url}},{key:"draw",value:function(a){var n=this,o=a.naturalWidth,r=a.naturalHeight,f=a.rotate,p=f===void 0?0:f,l=a.scaleX,i=l===void 0?1:l,s=a.scaleY,h=s===void 0?1:s,c=this.file,u=this.image,d=this.options,v=document.createElement("canvas"),m=v.getContext("2d"),B=Math.abs(p)%180===90,T=(d.resize==="contain"||d.resize==="cover")&&q(d.width)&&q(d.height),k=Math.max(d.maxWidth,0)||1/0,F=Math.max(d.maxHeight,0)||1/0,U=Math.max(d.minWidth,0)||0,z=Math.max(d.minHeight,0)||0,O=o/r,y=d.width,b=d.height;if(B){var he=[F,k];k=he[0],F=he[1];var ve=[z,U];U=ve[0],z=ve[1];var me=[b,y];y=me[0],b=me[1]}T&&(O=y/b);var ge=M({aspectRatio:O,width:k,height:F},"contain");k=ge.width,F=ge.height;var we=M({aspectRatio:O,width:U,height:z},"cover");if(U=we.width,z=we.height,T){var ye=M({aspectRatio:O,width:y,height:b},d.resize);y=ye.width,b=ye.height}else{var be=M({aspectRatio:O,width:y,height:b}),xe=be.width;y=xe===void 0?o:xe;var ke=be.height;b=ke===void 0?r:ke}y=Math.floor(Ze(Math.min(Math.max(y,U),k))),b=Math.floor(Ze(Math.min(Math.max(b,z),F)));var ft=-y/2,dt=-b/2,ht=y,vt=b,Q=[];if(T){var Be=0,Ee=0,ee=o,te=r,Pe=M({aspectRatio:O,width:o,height:r},{contain:"cover",cover:"contain"}[d.resize]);ee=Pe.width,te=Pe.height,Be=(o-ee)/2,Ee=(r-te)/2,Q.push(Be,Ee,ee,te)}if(Q.push(ft,dt,ht,vt),B){var Ce=[b,y];y=Ce[0],b=Ce[1]}v.width=y,v.height=b,le(d.mimeType)||(d.mimeType=c.type);var Te="transparent";c.size>d.convertSize&&d.convertTypes.indexOf(d.mimeType)>=0&&(d.mimeType="image/jpeg");var Se=d.mimeType==="image/jpeg";if(Se&&(Te="#fff"),m.fillStyle=Te,m.fillRect(0,0,y,b),d.beforeDraw&&d.beforeDraw.call(this,m,v),!this.aborted&&(m.save(),m.translate(y/2,b/2),m.rotate(p*Math.PI/180),m.scale(i,h),m.drawImage.apply(m,[u].concat(Q)),m.restore(),d.drew&&d.drew.call(this,m,v),!this.aborted)){var Ae=function(I){if(!n.aborted){var Fe=function(L){return n.done({naturalWidth:o,naturalHeight:r,result:L})};if(I&&Se&&d.retainExif&&n.exif&&n.exif.length>0){var je=function(L){return Fe(Ve(Xe(xn(L,n.exif),d.mimeType)))};if(I.arrayBuffer)I.arrayBuffer().then(je).catch(function(){n.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var _=new re;n.reader=_,_.onload=function(ne){var L=ne.target;je(L.result)},_.onabort=function(){n.fail(new Error("Aborted to read the compressed image with FileReader."))},_.onerror=function(){n.fail(new Error("Failed to read the compressed image with FileReader."))},_.onloadend=function(){n.reader=null},_.readAsArrayBuffer(I)}}else Fe(I)}};v.toBlob?v.toBlob(Ae,d.mimeType,d.quality):Ae(Ve(v.toDataURL(d.mimeType,d.quality)))}}},{key:"done",value:function(a){var n=a.naturalWidth,o=a.naturalHeight,r=a.result,f=this.file,p=this.image,l=this.options;if(R&&p.src.indexOf("blob:")===0&&R.revokeObjectURL(p.src),r)if(l.strict&&!l.retainExif&&r.size>f.size&&l.mimeType===f.type&&!(l.width>n||l.height>o||l.minWidth>n||l.minHeight>o||l.maxWidth<n||l.maxHeight<o))r=f;else{var i=new Date;r.lastModified=i.getTime(),r.lastModifiedDate=i,r.name=f.name,r.name&&r.type!==f.type&&(r.name=r.name.replace(Bn,hn(r.type)))}else r=f;this.result=r,l.success&&l.success.call(this,r)}},{key:"fail",value:function(a){var n=this.options;if(n.error)n.error.call(this,a);else throw a}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=En,t}},{key:"setDefaults",value:function(a){Z(Ge,a)}}]),t}();const fe=async t=>{const e=new(await ue);return e.file("snapshot.json",JSON.stringify(t)).file("screenshot.png",await tt.getItem(t.id)),await e.generateAsync({type:"blob",compression:"STORE"})},Cn=async t=>{const e=`snapshot-${t.id}.zip`;Y.saveAs(await fe(t),e)},de=async t=>{const e=await tt.getItem(t.id),a=await new Promise((o,r)=>{new Pn(new Blob([e],{type:"image/png"}),{quality:.75,convertSize:2e5,success(f){o(f)},error(f){r(f)}})});return new Blob([a],{type:"image/jpeg"})},Tn=async t=>{const e=`snapshot-${t.id}.jpg`;Y.saveAs(await de(t),e)},Un=async t=>{const e=new(await ue);for(const n of t)await ce(),e.file(n.id+".jpg",de(n));const a=await e.generateAsync({type:"blob",compression:"STORE"});Y.saveAs(a,`batch-png-${t.length}.zip`)},zn=async t=>{const e=new(await ue);for(const n of t)await ce(),e.file(n.id+".zip",await fe(n));const a=await e.generateAsync({type:"blob",compression:"STORE"});Y.saveAs(a,`batch-zip-${t.length}.zip`)},ct=async t=>{var a;const{snapshotImageId:e}=K();return(a=e[t.id])!=null?a:ot(await de(t).then(n=>n.arrayBuffer()),"file.jpg").then(n=>{const o=Rt(n.href);if(!o)throw new Error("imageId not found");return e[t.id]=o,o})},ut=async t=>{const{snapshotImportId:e,importSnapshotId:a}=K();return e[t.id]||ot(await fe(t).then(n=>n.arrayBuffer()),"file.zip").then(n=>(e[t.id]=n.id,a[n.id]=t.id,pt(t.id,n.id),n.id))},In=async t=>{const e=et(3);return(await Promise.allSettled(t.map(a=>e(()=>ct(a))))).reduce((a,n)=>(n.status=="fulfilled"&&a.push(n.value),a),[])},Ln=async t=>{const e=et(3);return(await Promise.allSettled(t.map(a=>e(()=>ut(a))))).reduce((a,n)=>(n.status=="fulfilled"&&a.push(n.value),a),[])},pt=async(t,e)=>fetch("https://detect.gkd.li/api/detectSnapshot?"+Ot({id:t,importId:e}).toString()),Dn=async(t,e)=>{if(!e||!Number.isSafeInteger(+e))return;const{importSnapshotId:a,waitInit:n}=K();await n(),!a[e]&&await pt(t,e)},Sn={flex:"","gap-16px":""},An=["href"],Mn=J({__name:"ActionCard",props:{snapshot:{},onDelete:{type:Function,default:_t},showPreview:{type:Boolean,default:!0},showExport:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},showShare:{type:Boolean,default:!0}},setup(t){const e=t,a=Ut(),{snapshotImportId:n,snapshotImageId:o}=K(),r=H(async()=>Tn(e.snapshot)),f=H(async()=>Cn(e.snapshot)),p=$(()=>a.resolve({name:"snapshot",params:{snapshotId:e.snapshot.id}}).href),l=H(async()=>{await He();const c=await ct(e.snapshot);Ne({title:"分享链接",content:Le(c)})}),i=H(async()=>{await He();const c=await ut(e.snapshot);Ne({title:"分享链接",content:location.origin+`/i/${c}`})}),s=async()=>{await $t.removeItem(e.snapshot.id),await ce(500),e.onDelete()},h=async c=>navigator.clipboard.writeText(c).then(()=>{X.success("复制成功")}).catch(()=>{X.success("复制失败")});return(c,u)=>{const d=Mt,v=se,m=Nt,B=Qe,T=Ht,k=Kt;return S(),Ie("div",Sn,[c.showPreview?(S(),Ie("a",{key:0,flex:"",target:"_blank",href:x(p)},[w(v,{text:"",title:"查看"},{icon:g(()=>[w(d,{size:""},{default:g(()=>u[2]||(u[2]=[E("svg",{viewBox:"0 0 1024 1024"},[E("path",{d:"M549.973333 128 633.6 145.066667 474.026667 896 390.4 878.933333 549.973333 128M835.84 512 682.666667 358.826667 682.666667 238.08 956.586667 512 682.666667 785.493333 682.666667 664.746667 835.84 512M67.413333 512 341.333333 238.08 341.333333 358.826667 188.16 512 341.333333 664.746667 341.333333 785.493333 67.413333 512Z"})],-1)])),_:1})]),_:1})],8,An)):N("",!0),c.showExport?(S(),j(B,{key:1},{trigger:g(()=>[w(v,{text:""},{icon:g(()=>[w(d,null,{default:g(()=>u[3]||(u[3]=[E("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[E("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[E("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),E("path",{d:"M7 11l5 5l5-5"}),E("path",{d:"M12 4v12"})])],-1)])),_:1})]),_:1})]),default:g(()=>[w(m,{vertical:""},{default:g(()=>[w(v,{onClick:x(f).invoke,loading:x(f).loading},{default:g(()=>u[4]||(u[4]=[P(" 下载-快照 ")])),_:1},8,["onClick","loading"]),w(v,{onClick:x(r).invoke,loading:x(r).loading},{default:g(()=>u[5]||(u[5]=[P(" 下载-图片 ")])),_:1},8,["onClick","loading"])]),_:1})]),_:1})):N("",!0),c.showShare?(S(),j(B,{key:2},{trigger:g(()=>[w(v,{text:""},{icon:g(()=>[w(d,null,{default:g(()=>u[6]||(u[6]=[E("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[E("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81c1.66 0 3-1.34 3-3s-1.34-3-3-3s-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65c0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",fill:"currentColor"})],-1)])),_:1})]),_:1})]),default:g(()=>[w(m,{vertical:""},{default:g(()=>[x(n)[c.snapshot.id]?(S(),j(v,{key:0,onClick:u[0]||(u[0]=F=>h(x(zt)(x(n)[c.snapshot.id])))},{default:g(()=>u[7]||(u[7]=[P(" 复制链接-快照 ")])),_:1})):(S(),j(v,{key:1,onClick:x(i).invoke,loading:x(i).loading},{default:g(()=>u[8]||(u[8]=[P(" 生成链接-快照 ")])),_:1},8,["onClick","loading"])),x(o)[c.snapshot.id]?(S(),j(v,{key:2,onClick:u[1]||(u[1]=F=>h(x(Le)(x(o)[c.snapshot.id])))},{default:g(()=>u[9]||(u[9]=[P(" 复制链接-图片 ")])),_:1})):(S(),j(v,{key:3,onClick:x(l).invoke,loading:x(l).loading},{default:g(()=>u[10]||(u[10]=[P(" 生成链接-图片 ")])),_:1},8,["onClick","loading"]))]),_:1})]),_:1})):N("",!0),c.showDelete?(S(),j(k,{key:3,onPositiveClick:s},{trigger:g(()=>[w(T,null,{trigger:g(()=>[w(v,{text:""},{icon:g(()=>[w(d,null,{default:g(()=>u[11]||(u[11]=[E("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[E("g",{fill:"none"},[E("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})])],-1)])),_:1})]),_:1})]),default:g(()=>[u[12]||(u[12]=P(" 删除快照 "))]),_:1})]),default:g(()=>[u[13]||(u[13]=P(" 是否删除快照? "))]),_:1})):N("",!0)])}}});export{Mn as _,zn as a,Un as b,In as c,Ln as d,ct as e,ut as f,Dn as g,Ne as s,He as w};
25
- //# sourceMappingURL=ActionCard.vue_vue_type_script_setup_true_lang-CjXPRV-z.js.map
25
+ //# sourceMappingURL=ActionCard.vue_vue_type_script_setup_true_lang-z1Cgyjmi.js.map