@mytools-all/mytools-ctool 0.1.0 → 0.1.1

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/index.html CHANGED
@@ -1,53 +1,53 @@
1
- <!doctype html>
2
- <html lang="zh-CN">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width,initial-scale=1" />
6
- <title>Ctool</title>
7
- <link rel="stylesheet" href="tool.css" />
8
- <style></style>
9
- </head>
10
- <body>
11
- <main>
12
- <div class="toolbar">
13
- <strong>Ctool</strong
14
- ><input
15
- id="tool-search"
16
- placeholder="搜索工具"
17
- aria-label="搜索工具"
18
- /><span class="spacer"></span><button id="copy">复制结果</button
19
- ><button id="theme">◐</button>
20
- </div>
21
- <div class="workspace">
22
- <nav id="tools" class="sidebar"></nav>
23
- <section class="content stack">
24
- <div class="row">
25
- <strong id="title"></strong><span class="spacer"></span
26
- ><select id="operation" aria-label="操作"></select
27
- ><button id="run" class="primary">执行</button>
28
- </div>
29
- <div id="extra"></div>
30
- <textarea
31
- id="input"
32
- style="flex: 1"
33
- placeholder="输入内容…"
34
- aria-label="工具输入"
35
- spellcheck="false"
36
- ></textarea>
37
- <div class="row">
38
- <span class="muted">结果</span><span class="spacer"></span
39
- ><button id="swap">结果作为输入 ↑</button>
40
- </div>
41
- <textarea
42
- id="output"
43
- style="flex: 1"
44
- readonly
45
- aria-label="工具结果"
46
- ></textarea>
47
- </section>
48
- </div>
49
- <footer id="status" class="status" role="status"></footer>
50
- </main>
51
- <script type="module" src="app.mjs"></script>
52
- </body>
53
- </html>
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>Ctool</title>
7
+ <link rel="stylesheet" href="tool.css" />
8
+ <style></style>
9
+ </head>
10
+ <body>
11
+ <main>
12
+ <div class="toolbar">
13
+ <strong>Ctool</strong
14
+ ><input
15
+ id="tool-search"
16
+ placeholder="搜索工具"
17
+ aria-label="搜索工具"
18
+ /><span class="spacer"></span><button id="copy">复制结果</button
19
+ ><button id="theme">◐</button>
20
+ </div>
21
+ <div class="workspace">
22
+ <nav id="tools" class="sidebar"></nav>
23
+ <section class="content stack">
24
+ <div class="row">
25
+ <strong id="title"></strong><span class="spacer"></span
26
+ ><select id="operation" aria-label="操作"></select
27
+ ><button id="run" class="primary">执行</button>
28
+ </div>
29
+ <div id="extra"></div>
30
+ <textarea
31
+ id="input"
32
+ style="flex: 1"
33
+ placeholder="输入内容…"
34
+ aria-label="工具输入"
35
+ spellcheck="false"
36
+ ></textarea>
37
+ <div class="row">
38
+ <span class="muted">结果</span><span class="spacer"></span
39
+ ><button id="swap">结果作为输入 ↑</button>
40
+ </div>
41
+ <textarea
42
+ id="output"
43
+ style="flex: 1"
44
+ readonly
45
+ aria-label="工具结果"
46
+ ></textarea>
47
+ </section>
48
+ </div>
49
+ <footer id="status" class="status" role="status"></footer>
50
+ </main>
51
+ <script type="module" src="app.mjs"></script>
52
+ </body>
53
+ </html>
package/md5.LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright 2014-2026 Chen, Yi-Cyuan
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2014-2026 Chen, Yi-Cyuan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/md5.mjs CHANGED
@@ -1,10 +1,10 @@
1
- function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,e={exports:{}};
2
- /**
3
- * [js-md5]{@link https://github.com/emn178/js-md5}
4
- *
5
- * @namespace md5
6
- * @version 0.9.2
7
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
8
- * @copyright Chen, Yi-Cyuan 2014-2026
9
- * @license MIT
10
- */r=e,function(){var t="input is invalid type",e="object"==typeof window,i=e?window:{};i.JS_MD5_NO_WINDOW&&(e=!1),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(i=self);var h=!i.JS_MD5_NO_COMMON_JS&&r.exports,s=!i.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),n=[128,32768,8388608,-2147483648],o=[0,8,16,24],f=["hex","array","digest","arrayBuffer"];f.push("buffer"),f.push("base64");var u,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),y=[];if(s){var c=new ArrayBuffer(68);u=new Uint8Array(c),y=new Uint32Array(c)}var l=Array.isArray;!i.JS_MD5_NO_NODE_JS&&l||(l=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var d=ArrayBuffer.isView;!s||!i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&d||(d=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var b=function(r){var e=typeof r;if("string"===e)return[r,!0];if("object"!==e||null===r)throw new Error(t);if(s&&r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!l(r)&&!d(r))throw new Error(t);return[r,!1]},v=function(t){return function(r){return new A(!0).update(r)[t]()}},w=function(t){return function(r,e){return new _(r,!0).update(e)[t]()}};function A(t){if(t)y[0]=y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0,this.blocks=y,this.buffer8=u;else if(s){var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function _(t,r){var e,i=b(t);if(t=i[0],i[1]){var h,s=[],a=t.length,n=0;for(e=0;e<a;++e)(h=t.charCodeAt(e))<128?s[n++]=h:h<2048?(s[n++]=192|h>>>6,s[n++]=128|63&h):h<55296||h>=57344?(s[n++]=224|h>>>12,s[n++]=128|h>>>6&63,s[n++]=128|63&h):(h=65536+((1023&h)<<10|1023&t.charCodeAt(++e)),s[n++]=240|h>>>18,s[n++]=128|h>>>12&63,s[n++]=128|h>>>6&63,s[n++]=128|63&h);t=s}t.length>64&&(t=new A(!0).update(t).array());var o=[],f=[];for(e=0;e<64;++e){var u=t[e]||0;o[e]=92^u,f[e]=54^u}A.call(this,r),this.update(f),this.oKeyPad=o,this.inner=!0,this.sharedMemory=r}A.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r=b(t);t=r[0];for(var e,i,h=r[1],a=0,n=t.length,f=this.blocks,u=this.buffer8;a<n;){if(this.hashed&&(this.hashed=!1,f[0]=f[16],f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0),h)if(s)for(i=this.start;a<n&&i<64;++a)(e=t.charCodeAt(a))<128?u[i++]=e:e<2048?(u[i++]=192|e>>>6,u[i++]=128|63&e):e<55296||e>=57344?(u[i++]=224|e>>>12,u[i++]=128|e>>>6&63,u[i++]=128|63&e):(e=65536+((1023&e)<<10|1023&t.charCodeAt(++a)),u[i++]=240|e>>>18,u[i++]=128|e>>>12&63,u[i++]=128|e>>>6&63,u[i++]=128|63&e);else for(i=this.start;a<n&&i<64;++a)(e=t.charCodeAt(a))<128?f[i>>>2]|=e<<o[3&i++]:e<2048?(f[i>>>2]|=(192|e>>>6)<<o[3&i++],f[i>>>2]|=(128|63&e)<<o[3&i++]):e<55296||e>=57344?(f[i>>>2]|=(224|e>>>12)<<o[3&i++],f[i>>>2]|=(128|e>>>6&63)<<o[3&i++],f[i>>>2]|=(128|63&e)<<o[3&i++]):(e=65536+((1023&e)<<10|1023&t.charCodeAt(++a)),f[i>>>2]|=(240|e>>>18)<<o[3&i++],f[i>>>2]|=(128|e>>>12&63)<<o[3&i++],f[i>>>2]|=(128|e>>>6&63)<<o[3&i++],f[i>>>2]|=(128|63&e)<<o[3&i++]);else if(s)for(i=this.start;a<n&&i<64;++a)u[i++]=t[a];else for(i=this.start;a<n&&i<64;++a)f[i>>>2]|=t[a]<<o[3&i++];this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=n[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},A.prototype.hash=function(){var t,r,e,i,h,s,a=this.blocks;this.first?r=((r=((t=((t=a[0]-680876937)<<7|t>>>25)-271733879|0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+a[1]-117830708)<<12|i>>>20)+t|0)&(-271733879^t))+a[2]-1126478375)<<17|e>>>15)+i|0)&(i^t))+a[3]-1316259209)<<22|r>>>10)+e|0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+a[0]-680876936)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[1]-389564586)<<12|i>>>20)+t|0)&(t^r))+a[2]+606105819)<<17|e>>>15)+i|0)&(i^t))+a[3]-1044525330)<<22|r>>>10)+e|0),r=((r+=((t=((t+=(i^r&(e^i))+a[4]-176418897)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[5]+1200080426)<<12|i>>>20)+t|0)&(t^r))+a[6]-1473231341)<<17|e>>>15)+i|0)&(i^t))+a[7]-45705983)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+a[8]+1770035416)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[9]-1958414417)<<12|i>>>20)+t|0)&(t^r))+a[10]-42063)<<17|e>>>15)+i|0)&(i^t))+a[11]-1990404162)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+a[12]+1804603682)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[13]-40341101)<<12|i>>>20)+t|0)&(t^r))+a[14]-1502002290)<<17|e>>>15)+i|0)&(i^t))+a[15]+1236535329)<<22|r>>>10)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[1]-165796510)<<5|t>>>27)+r|0)^r))+a[6]-1069501632)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[11]+643717713)<<14|e>>>18)+i|0)^i))+a[0]-373897302)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[5]-701558691)<<5|t>>>27)+r|0)^r))+a[10]+38016083)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[15]-660478335)<<14|e>>>18)+i|0)^i))+a[4]-405537848)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[9]+568446438)<<5|t>>>27)+r|0)^r))+a[14]-1019803690)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[3]-187363961)<<14|e>>>18)+i|0)^i))+a[8]+1163531501)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[13]-1444681467)<<5|t>>>27)+r|0)^r))+a[2]-51403784)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[7]+1735328473)<<14|e>>>18)+i|0)^i))+a[12]-1926607734)<<20|r>>>12)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[5]-378558)<<4|t>>>28)+r|0))+a[8]-2022574463)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[11]+1839030562)<<16|e>>>16)+i|0))+a[14]-35309556)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[1]-1530992060)<<4|t>>>28)+r|0))+a[4]+1272893353)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[7]-155497632)<<16|e>>>16)+i|0))+a[10]-1094730640)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[13]+681279174)<<4|t>>>28)+r|0))+a[0]-358537222)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[3]-722521979)<<16|e>>>16)+i|0))+a[6]+76029189)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[9]-640364487)<<4|t>>>28)+r|0))+a[12]-421815835)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[15]+530742520)<<16|e>>>16)+i|0))+a[2]-995338651)<<23|r>>>9)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[0]-198630844)<<6|t>>>26)+r|0)|~e))+a[7]+1126891415)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[14]-1416354905)<<15|e>>>17)+i|0)|~t))+a[5]-57434055)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[12]+1700485571)<<6|t>>>26)+r|0)|~e))+a[3]-1894986606)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[10]-1051523)<<15|e>>>17)+i|0)|~t))+a[1]-2054922799)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[8]+1873313359)<<6|t>>>26)+r|0)|~e))+a[15]-30611744)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[6]-1560198380)<<15|e>>>17)+i|0)|~t))+a[13]+1309151649)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[4]-145523070)<<6|t>>>26)+r|0)|~e))+a[11]-1120210379)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[2]+718787259)<<15|e>>>17)+i|0)|~t))+a[9]-343485551)<<21|r>>>11)+e|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=e-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+e|0,this.h3=this.h3+i|0)},A.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return a[t>>>4&15]+a[15&t]+a[t>>>12&15]+a[t>>>8&15]+a[t>>>20&15]+a[t>>>16&15]+a[t>>>28&15]+a[t>>>24&15]+a[r>>>4&15]+a[15&r]+a[r>>>12&15]+a[r>>>8&15]+a[r>>>20&15]+a[r>>>16&15]+a[r>>>28&15]+a[r>>>24&15]+a[e>>>4&15]+a[15&e]+a[e>>>12&15]+a[e>>>8&15]+a[e>>>20&15]+a[e>>>16&15]+a[e>>>28&15]+a[e>>>24&15]+a[i>>>4&15]+a[15&i]+a[i>>>12&15]+a[i>>>8&15]+a[i>>>20&15]+a[i>>>16&15]+a[i>>>28&15]+a[i>>>24&15]},A.prototype.toString=A.prototype.hex,A.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255]},A.prototype.array=A.prototype.digest,A.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},A.prototype.buffer=A.prototype.arrayBuffer,A.prototype.base64=function(){for(var t,r,e,i="",h=this.array(),s=0;s<15;)t=h[s++],r=h[s++],e=h[s++],i+=p[t>>>2]+p[63&(t<<4|r>>>4)]+p[63&(r<<2|e>>>6)]+p[63&e];return t=h[s],i+=p[t>>>2]+p[t<<4&63]+"=="},_.prototype=new A,_.prototype.finalize=function(){if(A.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();A.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),A.prototype.finalize.call(this)}};var B=function(){var t=v("hex");t.create=function(){return new A},t.update=function(r){return t.create().update(r)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=v(e)}return t}();B.md5=B,B.md5.hmac=function(){var t=w("hex");t.create=function(t){return new _(t)},t.update=function(r,e){return t.create(r).update(e)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=w(e)}return t}(),h?r.exports=B:i.md5=B}();var i=t(e.exports);export{i as default,i as md5};
1
+ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,e={exports:{}};
2
+ /**
3
+ * [js-md5]{@link https://github.com/emn178/js-md5}
4
+ *
5
+ * @namespace md5
6
+ * @version 0.9.2
7
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
8
+ * @copyright Chen, Yi-Cyuan 2014-2026
9
+ * @license MIT
10
+ */r=e,function(){var t="input is invalid type",e="object"==typeof window,i=e?window:{};i.JS_MD5_NO_WINDOW&&(e=!1),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(i=self);var h=!i.JS_MD5_NO_COMMON_JS&&r.exports,s=!i.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,a="0123456789abcdef".split(""),n=[128,32768,8388608,-2147483648],o=[0,8,16,24],f=["hex","array","digest","arrayBuffer"];f.push("buffer"),f.push("base64");var u,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),y=[];if(s){var c=new ArrayBuffer(68);u=new Uint8Array(c),y=new Uint32Array(c)}var l=Array.isArray;!i.JS_MD5_NO_NODE_JS&&l||(l=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var d=ArrayBuffer.isView;!s||!i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&d||(d=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var b=function(r){var e=typeof r;if("string"===e)return[r,!0];if("object"!==e||null===r)throw new Error(t);if(s&&r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!l(r)&&!d(r))throw new Error(t);return[r,!1]},v=function(t){return function(r){return new A(!0).update(r)[t]()}},w=function(t){return function(r,e){return new _(r,!0).update(e)[t]()}};function A(t){if(t)y[0]=y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0,this.blocks=y,this.buffer8=u;else if(s){var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function _(t,r){var e,i=b(t);if(t=i[0],i[1]){var h,s=[],a=t.length,n=0;for(e=0;e<a;++e)(h=t.charCodeAt(e))<128?s[n++]=h:h<2048?(s[n++]=192|h>>>6,s[n++]=128|63&h):h<55296||h>=57344?(s[n++]=224|h>>>12,s[n++]=128|h>>>6&63,s[n++]=128|63&h):(h=65536+((1023&h)<<10|1023&t.charCodeAt(++e)),s[n++]=240|h>>>18,s[n++]=128|h>>>12&63,s[n++]=128|h>>>6&63,s[n++]=128|63&h);t=s}t.length>64&&(t=new A(!0).update(t).array());var o=[],f=[];for(e=0;e<64;++e){var u=t[e]||0;o[e]=92^u,f[e]=54^u}A.call(this,r),this.update(f),this.oKeyPad=o,this.inner=!0,this.sharedMemory=r}A.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r=b(t);t=r[0];for(var e,i,h=r[1],a=0,n=t.length,f=this.blocks,u=this.buffer8;a<n;){if(this.hashed&&(this.hashed=!1,f[0]=f[16],f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0),h)if(s)for(i=this.start;a<n&&i<64;++a)(e=t.charCodeAt(a))<128?u[i++]=e:e<2048?(u[i++]=192|e>>>6,u[i++]=128|63&e):e<55296||e>=57344?(u[i++]=224|e>>>12,u[i++]=128|e>>>6&63,u[i++]=128|63&e):(e=65536+((1023&e)<<10|1023&t.charCodeAt(++a)),u[i++]=240|e>>>18,u[i++]=128|e>>>12&63,u[i++]=128|e>>>6&63,u[i++]=128|63&e);else for(i=this.start;a<n&&i<64;++a)(e=t.charCodeAt(a))<128?f[i>>>2]|=e<<o[3&i++]:e<2048?(f[i>>>2]|=(192|e>>>6)<<o[3&i++],f[i>>>2]|=(128|63&e)<<o[3&i++]):e<55296||e>=57344?(f[i>>>2]|=(224|e>>>12)<<o[3&i++],f[i>>>2]|=(128|e>>>6&63)<<o[3&i++],f[i>>>2]|=(128|63&e)<<o[3&i++]):(e=65536+((1023&e)<<10|1023&t.charCodeAt(++a)),f[i>>>2]|=(240|e>>>18)<<o[3&i++],f[i>>>2]|=(128|e>>>12&63)<<o[3&i++],f[i>>>2]|=(128|e>>>6&63)<<o[3&i++],f[i>>>2]|=(128|63&e)<<o[3&i++]);else if(s)for(i=this.start;a<n&&i<64;++a)u[i++]=t[a];else for(i=this.start;a<n&&i<64;++a)f[i>>>2]|=t[a]<<o[3&i++];this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=n[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},A.prototype.hash=function(){var t,r,e,i,h,s,a=this.blocks;this.first?r=((r=((t=((t=a[0]-680876937)<<7|t>>>25)-271733879|0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+a[1]-117830708)<<12|i>>>20)+t|0)&(-271733879^t))+a[2]-1126478375)<<17|e>>>15)+i|0)&(i^t))+a[3]-1316259209)<<22|r>>>10)+e|0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+a[0]-680876936)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[1]-389564586)<<12|i>>>20)+t|0)&(t^r))+a[2]+606105819)<<17|e>>>15)+i|0)&(i^t))+a[3]-1044525330)<<22|r>>>10)+e|0),r=((r+=((t=((t+=(i^r&(e^i))+a[4]-176418897)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[5]+1200080426)<<12|i>>>20)+t|0)&(t^r))+a[6]-1473231341)<<17|e>>>15)+i|0)&(i^t))+a[7]-45705983)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+a[8]+1770035416)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[9]-1958414417)<<12|i>>>20)+t|0)&(t^r))+a[10]-42063)<<17|e>>>15)+i|0)&(i^t))+a[11]-1990404162)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+a[12]+1804603682)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[13]-40341101)<<12|i>>>20)+t|0)&(t^r))+a[14]-1502002290)<<17|e>>>15)+i|0)&(i^t))+a[15]+1236535329)<<22|r>>>10)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[1]-165796510)<<5|t>>>27)+r|0)^r))+a[6]-1069501632)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[11]+643717713)<<14|e>>>18)+i|0)^i))+a[0]-373897302)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[5]-701558691)<<5|t>>>27)+r|0)^r))+a[10]+38016083)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[15]-660478335)<<14|e>>>18)+i|0)^i))+a[4]-405537848)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[9]+568446438)<<5|t>>>27)+r|0)^r))+a[14]-1019803690)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[3]-187363961)<<14|e>>>18)+i|0)^i))+a[8]+1163531501)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[13]-1444681467)<<5|t>>>27)+r|0)^r))+a[2]-51403784)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[7]+1735328473)<<14|e>>>18)+i|0)^i))+a[12]-1926607734)<<20|r>>>12)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[5]-378558)<<4|t>>>28)+r|0))+a[8]-2022574463)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[11]+1839030562)<<16|e>>>16)+i|0))+a[14]-35309556)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[1]-1530992060)<<4|t>>>28)+r|0))+a[4]+1272893353)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[7]-155497632)<<16|e>>>16)+i|0))+a[10]-1094730640)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[13]+681279174)<<4|t>>>28)+r|0))+a[0]-358537222)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[3]-722521979)<<16|e>>>16)+i|0))+a[6]+76029189)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[9]-640364487)<<4|t>>>28)+r|0))+a[12]-421815835)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[15]+530742520)<<16|e>>>16)+i|0))+a[2]-995338651)<<23|r>>>9)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[0]-198630844)<<6|t>>>26)+r|0)|~e))+a[7]+1126891415)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[14]-1416354905)<<15|e>>>17)+i|0)|~t))+a[5]-57434055)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[12]+1700485571)<<6|t>>>26)+r|0)|~e))+a[3]-1894986606)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[10]-1051523)<<15|e>>>17)+i|0)|~t))+a[1]-2054922799)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[8]+1873313359)<<6|t>>>26)+r|0)|~e))+a[15]-30611744)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[6]-1560198380)<<15|e>>>17)+i|0)|~t))+a[13]+1309151649)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[4]-145523070)<<6|t>>>26)+r|0)|~e))+a[11]-1120210379)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[2]+718787259)<<15|e>>>17)+i|0)|~t))+a[9]-343485551)<<21|r>>>11)+e|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=e-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+e|0,this.h3=this.h3+i|0)},A.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return a[t>>>4&15]+a[15&t]+a[t>>>12&15]+a[t>>>8&15]+a[t>>>20&15]+a[t>>>16&15]+a[t>>>28&15]+a[t>>>24&15]+a[r>>>4&15]+a[15&r]+a[r>>>12&15]+a[r>>>8&15]+a[r>>>20&15]+a[r>>>16&15]+a[r>>>28&15]+a[r>>>24&15]+a[e>>>4&15]+a[15&e]+a[e>>>12&15]+a[e>>>8&15]+a[e>>>20&15]+a[e>>>16&15]+a[e>>>28&15]+a[e>>>24&15]+a[i>>>4&15]+a[15&i]+a[i>>>12&15]+a[i>>>8&15]+a[i>>>20&15]+a[i>>>16&15]+a[i>>>28&15]+a[i>>>24&15]},A.prototype.toString=A.prototype.hex,A.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255]},A.prototype.array=A.prototype.digest,A.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},A.prototype.buffer=A.prototype.arrayBuffer,A.prototype.base64=function(){for(var t,r,e,i="",h=this.array(),s=0;s<15;)t=h[s++],r=h[s++],e=h[s++],i+=p[t>>>2]+p[63&(t<<4|r>>>4)]+p[63&(r<<2|e>>>6)]+p[63&e];return t=h[s],i+=p[t>>>2]+p[t<<4&63]+"=="},_.prototype=new A,_.prototype.finalize=function(){if(A.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();A.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),A.prototype.finalize.call(this)}};var B=function(){var t=v("hex");t.create=function(){return new A},t.update=function(r){return t.create().update(r)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=v(e)}return t}();B.md5=B,B.md5.hmac=function(){var t=w("hex");t.create=function(t){return new _(t)},t.update=function(r,e){return t.create(r).update(e)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=w(e)}return t}(),h?r.exports=B:i.md5=B}();var i=t(e.exports);export{i as default,i as md5};
package/package.json CHANGED
@@ -1,43 +1,46 @@
1
- {
2
- "name": "@mytools-all/mytools-ctool",
3
- "version": "0.1.0",
4
- "description": "Ctool",
5
- "type": "module",
6
- "main": "index.html",
7
- "license": "MIT",
8
- "author": "MyTools Contributors",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/mytools-all/mytools-ctool.git"
12
- },
13
- "homepage": "https://github.com/mytools-all/mytools-ctool#readme",
14
- "bugs": {
15
- "url": "https://github.com/mytools-all/mytools-ctool/issues"
16
- },
17
- "publishConfig": {
18
- "access": "public",
19
- "registry": "https://registry.npmjs.org/"
20
- },
21
- "files": [
22
- "plugin.json",
23
- "*.html",
24
- "*.css",
25
- "*.svg",
26
- "*.png",
27
- "vendor/",
28
- "LICENSE",
29
- "THIRD_PARTY.md",
30
- "README.md",
31
- "app.mjs",
32
- "common.mjs",
33
- "md5.mjs",
34
- "regex-worker.mjs",
35
- "utils.mjs",
36
- "yaml.mjs",
37
- "*.js",
38
- "*.LICENSE"
39
- ],
40
- "scripts": {
41
- "test": "node --test"
42
- }
43
- }
1
+ {
2
+ "name": "@mytools-all/mytools-ctool",
3
+ "version": "0.1.1",
4
+ "description": "Ctool",
5
+ "type": "module",
6
+ "main": "index.html",
7
+ "license": "MIT",
8
+ "author": "MyTools Contributors",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/mytools-all/mytools-ctool.git"
12
+ },
13
+ "homepage": "https://github.com/mytools-all/mytools-ctool#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/mytools-all/mytools-ctool/issues"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
21
+ "files": [
22
+ "plugin.json",
23
+ "*.html",
24
+ "*.css",
25
+ "*.svg",
26
+ "*.png",
27
+ "vendor/",
28
+ "LICENSE",
29
+ "THIRD_PARTY.md",
30
+ "README.md",
31
+ "app.mjs",
32
+ "common.mjs",
33
+ "md5.mjs",
34
+ "regex-worker.mjs",
35
+ "utils.mjs",
36
+ "yaml.mjs",
37
+ "*.js",
38
+ "*.LICENSE"
39
+ ],
40
+ "engines": {
41
+ "mytools": ">=0.2.0 <0.3.0"
42
+ },
43
+ "scripts": {
44
+ "test": "node --test"
45
+ }
46
+ }
package/plugin.json CHANGED
@@ -1,26 +1,29 @@
1
- {
2
- "name": "mytools-ctool",
3
- "description": "Ctool",
4
- "apiVersion": 1,
5
- "main": "index.html",
6
- "pluginName": "Ctool",
7
- "version": "0.1.0",
8
- "capabilities": [
9
- "clipboard.write"
10
- ],
11
- "features": [
12
- {
13
- "code": "ctool",
14
- "explain": "打开Ctool",
15
- "cmds": [
16
- "Ctool",
17
- "开发工具",
18
- "编码",
19
- "Base64",
20
- "时间戳",
21
- "哈希",
22
- "正则"
23
- ]
24
- }
25
- ]
26
- }
1
+ {
2
+ "name": "mytools-ctool",
3
+ "description": "Ctool",
4
+ "apiVersion": 1,
5
+ "main": "index.html",
6
+ "pluginName": "Ctool",
7
+ "version": "0.1.1",
8
+ "capabilities": [
9
+ "clipboard.write"
10
+ ],
11
+ "features": [
12
+ {
13
+ "code": "ctool",
14
+ "explain": "打开Ctool",
15
+ "cmds": [
16
+ "Ctool",
17
+ "开发工具",
18
+ "编码",
19
+ "Base64",
20
+ "时间戳",
21
+ "哈希",
22
+ "正则"
23
+ ]
24
+ }
25
+ ],
26
+ "engines": {
27
+ "mytools": ">=0.2.0 <0.3.0"
28
+ }
29
+ }
package/regex-worker.mjs CHANGED
@@ -1,23 +1,23 @@
1
- self.onmessage = ({ data: { text, pattern, flags } }) => {
2
- try {
3
- const re = new RegExp(pattern, flags);
4
- const results = [];
5
- if (re.global) {
6
- let match;
7
- while ((match = re.exec(text)) && results.length < 2000) {
8
- results.push({
9
- index: match.index,
10
- match: match[0],
11
- groups: match.slice(1),
12
- });
13
- if (!match[0]) re.lastIndex++;
14
- }
15
- } else {
16
- const m = re.exec(text);
17
- if (m) results.push({ index: m.index, match: m[0], groups: m.slice(1) });
18
- }
19
- self.postMessage({ result: JSON.stringify(results, null, 2) });
20
- } catch (e) {
21
- self.postMessage({ error: e.message });
22
- }
23
- };
1
+ self.onmessage = ({ data: { text, pattern, flags } }) => {
2
+ try {
3
+ const re = new RegExp(pattern, flags);
4
+ const results = [];
5
+ if (re.global) {
6
+ let match;
7
+ while ((match = re.exec(text)) && results.length < 2000) {
8
+ results.push({
9
+ index: match.index,
10
+ match: match[0],
11
+ groups: match.slice(1),
12
+ });
13
+ if (!match[0]) re.lastIndex++;
14
+ }
15
+ } else {
16
+ const m = re.exec(text);
17
+ if (m) results.push({ index: m.index, match: m[0], groups: m.slice(1) });
18
+ }
19
+ self.postMessage({ result: JSON.stringify(results, null, 2) });
20
+ } catch (e) {
21
+ self.postMessage({ error: e.message });
22
+ }
23
+ };