### Montgomery Reduction Setup Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Initializes parameters for Montgomery reduction, including shift, r, r2, rinv, and minv. ```javascript function M(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)} ``` -------------------------------- ### Montgomery Reduction Setup Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Factory function to create a Montgomery reduction context for efficient modular arithmetic. ```javascript o.mont = function(e) { return new M(e) } ``` -------------------------------- ### JavaScript Diffie-Hellman Key Exchange Setup Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Initializes a Diffie-Hellman key exchange object with a prime and optional generator. Supports setting public and private keys. ```javascript function(e,t,r){var n=r(6),i=new(r(100)),o=new n(24),a=new n(11),f=new n(10),s=new n(3),c=new n(7),h=r(99),u=r(20);function d(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._pub=new n(e),this}function l(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this._priv=new n(e),this}e.exports=b;var p={};function b(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=l):this._primeCode=8}function y(e,t){var r=new Buffer(e.toArray());return t?r.toString(t):r}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=functio ``` -------------------------------- ### Run DevOpsGPT with Docker Source: https://github.com/kuafuai/devopsgpt/blob/master/README.md This command launches the DevOpsGPT service using Docker. It maps local directories for workspace and configuration, and exposes the necessary ports. Ensure Docker is installed and the image is pulled. ```bash docker run -it \ -v$PWD/workspace:/app/workspace \ -v$PWD/env.yaml:/app/env.yaml \ -p8080:8080 -p8081:8081 kuafuai/devopsgpt:latest ``` -------------------------------- ### Webpack Polyfill Example Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html A polyfill for webpack's module system, providing 'deprecate', 'paths', 'children', 'loaded', and 'id' properties. ```javascript e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}} ``` -------------------------------- ### Complex 32-bit Integer Arithmetic Example Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html This snippet is part of a larger algorithm, likely a hashing function, demonstrating chained 32-bit integer multiplications and additions. It showcases how Math.imul is used in sequence to maintain intermediate results within the 32-bit range. ```javascript var a = 1073741824, b = 2; var result = Math.imul(a, b); console.log(result); ``` -------------------------------- ### JavaScript Internationalization Setup Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/tweet_button.2b2d73daf636805223fb11d48f3e94f7.en.html Initializes the __twttr object and sets up a basic internationalization function for tweet button translations. This bypasses JSHint unicode warnings. ```javascript /* eslint-disable */ window.__twttr = window.__twttr || {}; /* by pass jshint unicode warning for translations */ var i18n = {}; window._ = function (s, reps) { s = (__twttr.lang && i18n[__twttr.lang] && i18n[__twttr.lang][s]) || s; if (!reps) return s; return s.replace(/%{(\[a-z0-9_]+)}/gi, function (m, k) { return reps[k] || m; }); }; ``` -------------------------------- ### Get Y Coordinate Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Returns the Y coordinate of the point after converting from internal representation. ```javascript h.prototype.getY=function(){return this.y.fromRed()} ``` -------------------------------- ### Get X Coordinate Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Returns the X coordinate of the point after converting from internal representation. ```javascript h.prototype.getX=function(){return this.x.fromRed()} ``` -------------------------------- ### Get Y Coordinate of Elliptic Curve Point Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Normalizes the point and returns its Y coordinate in standard number format. ```javascript h.prototype.getY = function() { return this.normalize(), this.y.fromRed() } ``` -------------------------------- ### Montgomery Curve Get X Coordinate Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Retrieves the X coordinate of a normalized Montgomery curve point. ```javascript c.prototype.getX = function() { return this.normalize(), this.x.fromRed() } ``` -------------------------------- ### Create Signer and Verifier Instances Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Factory functions to create instances of Signer and Verifier streams for specific message digest algorithms. ```javascript function u(e){return new c(e)}function d(e){return new h(e)}e.exports={Sign:u,Verify:d,createSign:u,createVerify:d} ``` -------------------------------- ### Writable State Initialization Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Sets up the WritableState object, which manages the internal state for writable streams, including highWaterMark, encoding, and writing status. ```javascript function b(e,t){o=o||r(19),e=e||{};var f=t instanceof o;this.objectMode=!!e.objectMode,f&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var s=e.highWaterMark,c=e.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:f&&(c||0===c)?c:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===e.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(S,e,t),e._writableState.errorEm ``` -------------------------------- ### Elliptic Curve Initialization (Projective Coordinates) Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Initializes an elliptic curve point in projective coordinates. Handles infinity case. ```javascript function c(e, t, r) { a.BasePoint.call(this, e, "projective"), null === t && null === r ? (this.x = this.curve.one, t ``` -------------------------------- ### Buffer Slice Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Creates a new buffer that references the same memory as the original buffer but with different start and end points. ```javascript s.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),te;)r.ishrn(1);if(r.isEven()&&r.iadd(f),r.testn(1)||r.iadd(s),t.cmp(s)){if(!t.cmp(c))for(;r.mod(h).cmp(u);)r.iadd(l)}else for(;r.mod(o).cmp(d);)r.iadd(l);if(y(p=r.shrn(1))&&y(r)&&v(p)&&v(r)&&a.test(p)&&a.test(r))return r}}} ``` -------------------------------- ### Get Point Beta Value Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Retrieves the beta value for a point, used in endomorphism calculations. Computes and caches if not present. ```javascript h.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}} ``` -------------------------------- ### Cipher and Decipher Creation Functions Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Provides functions to create cipher and decipher instances, both with and without initialization vectors. Also exposes a list of available ciphers. ```javascript var n=r(1).Buffer,i=r(67).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=f,(f=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294 ``` -------------------------------- ### Cache Get Operation Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Retrieves a block of data from the cache. If 'e' is true, it attempts to retrieve a full block (16 bytes). ```javascript u.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null} ``` -------------------------------- ### Linked List Implementation Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html A basic implementation of a linked list with push, unshift, shift, clear, join, and concat methods. ```javascript function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0} e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length} e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length} e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}} e.prototype.clear=function(){this.head=this.tail=null,this.length=0} e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r} e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,f=0;a;)t=a.data,r=o,i=f,t.copy(r,i),f+=a.data.length,a=a.next;return o} ``` -------------------------------- ### Buffer Cache Get Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Retrieves a fixed-size chunk (16 bytes) from the buffer cache. Returns null if less than 16 bytes are available. ```javascript d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null} ``` -------------------------------- ### Preset Curve Initialization (Short Weierstrass) Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Initializes a preset elliptic curve using the 'short' (Weierstrass) form. Requires curve parameters like prime, a, b, n, and generator point. ```javascript function s(e) { "short" === e.type ? this.curve = new a.curve.short(e) : "edwards" === e.type ? this.curve = new a.curve.edwards(e) : this.curve = new a.curve.mont(e), this.g = this.curve.g, this.n = this.curve.n, this.hash = e.hash, f(this.g.validate(), "Invalid curve"), f(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O") } ``` -------------------------------- ### Defining ASN.1 Structure with Methods Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Illustrates how to define an ASN.1 structure using a fluent API. Methods like `obj`, `key`, `use`, `optional`, `def`, `explicit`, `implicit`, `any`, `choice`, and `contains` are used to configure the structure's behavior and data types. ```javascript c.prototype.use = function(e) { a(e); var t = this._baseState; return a(null === t.use), t.use = e, this }, c.prototype.optional = function() { return this._baseState.optional = !0, this }, c.prototype.def = function(e) { var t = this._baseState; return a(null === t.default), t.default = e, t.optional = !0, this }, c.prototype.explicit = function(e) { var t = this._baseState; return a(null === t.explicit && null === t.implicit), t.explicit = e, this }, c.prototype.implicit = function(e) { var t = this._baseState; return a(null === t.explicit && null === t.implicit), t.implicit = e, this }, c.prototype.obj = function() { var e = this._baseState, t = Array.prototype.slice.call(arguments); return e.obj = !0, 0 !== t.length && this._useArgs(t), this }, c.prototype.key = function(e) { var t = this._baseState; return a(null === t.key), t.key = e, this }, c.prototype.any = function() { return this._baseState.any = !0, this }, c.prototype.choice = function(e) { var t = this._baseState; return a(null === t.choice), t.choice = e, this._useArgs(Object.keys(e).map(function(t) { return e[t] })), this }, c.prototype.contains = function(e) { var t = this._baseState; return a(null === t.use), t.contains = e, this } ``` -------------------------------- ### Buffer Comparison (Instance Method) Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Compares this Buffer with another Buffer, with optional offset and length arguments. ```javascript s.prototype.compare=function(e,t,r,n,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new R ``` -------------------------------- ### Extended SHA-256 Initialization and Update Logic Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Provides an extended version of the SHA-256 initialization and update functions, likely for handling larger inputs or different internal states. Note the doubled state variables and processing loops. ```javascript function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}n(s,i),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,f=0|this._eh,s=0|this._fh,g=0|this._gh,m=0|this._hh,_=0|this._al,w=0|this._bl,S=0|this._cl,M=0|this._dl,E=0|this._el,A=0|this._fl,k=0|this._gl,x=0|this._hl,B=0;B<32;B+=2)t[B]=e.readInt32BE(4*B),t[B+1]=e.readInt32BE(4*B+4);for(;B<160;B+=2){var I=t[B-30],R=t[B-30+1],P=l(I,R),T=p(R,I),C=b(I=t[B-4],R=t[B-4+1]),j=y(R,I),O=t[B-14],U=t[B-14+1],D=t[B-32],L=t[B-32+1],N=T+U|0,q=P+O+v(N,T)|0;q=(q=q+C+v(N=N+j|0,j)|0)+D+v(N=N+L|0,L)|0,t[B]=q,t[B+1]=N}for(var z=0;z<160;z+=2){q=t[z],N=t[z+1];var K=h(r,n,i),F=h(_,w,S),H=u(r,_),Y=u(_,r),W=d(f,E),V=d(E,f),X=a[z],J=a[z+1],G=c(f,s,g),Z=c(E,A,k),$=x+V|0,Q=m+W+v($,x)|0;Q=(Q=(Q=Q+G+v($=$+Z|0,Z)|0)+X+v($=$+J|0,J)|0)+q+v($=$+N|0,N)|0;var ee=Y+F|0,te=H+K+v(ee,Y)|0;m=g,x=k,g=s,k=A,s=f,A=E,f=o+Q+v(E=M+$|0,M)|0,o=i,M=S,i=n,S=w,n=r,w=_,r=Q+te+v(_=$+ee|0,$)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._} ``` -------------------------------- ### Import Private Key Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Imports a private key into a key object. Handles different encoding formats for the private key. ```javascript o.prototype._importPrivate=function(e,t){this.priv=i.toArray(e,t),this.pub=null} ``` -------------------------------- ### Getting a Decoder Instance Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Retrieves a decoder instance based on a specified ASN.1 tag or structure. It handles cloning and implicit tag settings to ensure the correct decoder is used for nested or modified structures. ```javascript c.prototype._getUse = function(e, t) { var r = this._baseState; return r.useDecoder = this._use(e, t), a(null === r.useDecoder._baseState.parent), r.useDecoder = r.useDecoder._baseState.children[0], r.implicit !== r.useDecoder._baseState.implicit && (r.useDecoder = r.useDecoder.clone(), r.useDecoder._baseState.implicit = r.implicit), r.useDecoder } ``` -------------------------------- ### Import Public Key Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Imports a public key into a key object. Handles different encoding formats for the public key. ```javascript o.prototype._importPublic=function(e,t){this.pub=i.toArray(e,t),this.priv=null} ``` -------------------------------- ### Get Public Key Recovery Parameter Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Determines the correct recovery parameter for a given signature and public key. It iterates through possible recovery parameters until the one that matches the provided public key is found. ```javascript c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new s(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")} ``` -------------------------------- ### Initialize GitHub Button Functionality Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/github-btn.html This is the main IIFE that initializes the GitHub button functionality. It parses URL parameters, fetches data from the GitHub API, and updates the DOM to display the correct button state and counts. It handles different button types like 'watch', 'star', 'fork', 'follow', and 'sponsor'. ```javascript !function(){"use strict";const t=new Set(["user","repo","type","count","size","text","v"]);function e(t){return String(t).replace(/(\d)(?=(\d{3})+$)/g,"$1,")}const a=function(){const e=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),a=new Map;for(const s of e){const[e,r]=s.split("=");t.has(e)&&a.set(e,r)}return a}(),s=a.get("user"),r=a.get("repo"),o=a.get("type"),n=a.get("count"),c=a.get("size"),i=a.get("text"),l=a.get("v"),u=document.querySelector(".gh-btn"),d=document.querySelector(".github-btn"),b=document.querySelector(".gh-text"),$=document.querySelector(".gh-count"),h="on GitHub",f="https://github.com/",g="https://api.github.com/";let C;switch(window.callback=function(t){if("Not Found"!==t.data.message){switch(o){case"watch":"2"===l?($.textContent=t.data.subscribers_count&&e(t.data.subscribers_count),$.setAttribute("aria-label",`${$.textContent} watchers ${h}`)):($.textContent=t.data.stargazers_count&&e(t.data.stargazers_count),$.setAttribute("aria-label",`${$.textContent} stargazers ${h}`));break;case"star":$.textContent=t.data.stargazers_count&&e(t.data.stargazers_count),$.setAttribute("aria-label",`${$.textContent} stargazers ${h}`);break;case"fork":$.textContent=t.data.network_count&&e(t.data.network_count),$.setAttribute("aria-label",`${$.textContent} forks ${h}`);break;case"follow":$.textContent=t.data.followers&&e(t.data.followers),$.setAttribute("aria-label",`${$.textContent} followers ${h}`)}}else{switch(o){case"watch":"2"===l?($.textContent="0",$.setAttribute("aria-label",`0 watchers ${h}`)):($.textContent="0",$.setAttribute("aria-label",`0 stargazers ${h}`));break;case"star":$.textContent="0",$.setAttribute("aria-label",`0 stargazers ${h}`);break;case"fork":$.textContent="0",$.setAttribute("aria-label",`0 forks ${h}`);break;case"follow":$.textContent="0",$.setAttribute("aria-label",`0 followers ${h}`)}}}u.href=x,o){case"watch":"2"===l?(d.classList.add("github-watchers"),b.textContent="Watch",$.href=`${x}/watchers`):(d.classList.add("github-stargazers"),b.textContent="Star",$.href=`${x}/stargazers`),C=`${b.textContent} ${w}` ;break;case"star":d.classList.add("github-stargazers"),b.textContent="Star",$.href=`${x}/stargazers`,C=`${b.textContent} ${w}`;break;case"fork":d.classList.add("github-forks"),b.textContent="Fork",u.href=`${x}/fork`,$.href=`${x}/network`,C=`${b.textContent} ${w}`;break;case"follow":d.classList.add("github-me"),b.textContent=`Follow @${s}`,u.href=f+s,$.href=`${f+s}?tab=followers`,C=b.textContent;break;case"sponsor":d.classList.add("github-me"),b.textContent=`Sponsor @${s}`,u.href=`${f}sponsors/${s}`,C=b.textContent} ``` -------------------------------- ### Elliptic Curve Scalar Multiplication with Addition (WNAF) Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html Performs scalar multiplication and adds the result to another point, using the WNAF method. Optimized for multiple points. ```javascript h.prototype.mulAdd = function(e, t, r) { return this.curve._wnafMulAdd(1, [this, t], [e, r], 2, !1) } ``` -------------------------------- ### Implementing the _read Method Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html The `_read()` method is an abstract method that must be implemented by subclasses of `Readable`. It is called when the stream is ready to receive more data. If not implemented, it emits an error. ```javascript g.prototype._read = function(e) { this.emit("error", new Error("_read() is not implemented")) } ``` -------------------------------- ### Promise Implementation Snippet Source: https://github.com/kuafuai/devopsgpt/blob/master/frontend/Semantic UI_files/widget_iframe.2b2d73daf636805223fb11d48f3e94f7.html A small snippet related to Promise implementation, likely part of a larger library. It sets up a promise with resolve and reject functions. ```javascript function e(e){return"function"==typeof e} var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)} var r=0,n=void 0,i=void 0,o=function(e,t){d[r]=e,d[r+1]=t,2===(r+=2)&&(i?i(l):g())} var a="undefined"!=typeof window?window:void 0,f=a||{},s=f.MutationObserver||f.WebKitMutationObserver c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process) h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel function u(){var e=setTimeout return function(){return e(l,1)}} var d=new Array(1e3) function l(){for(var e=0;e>>32-t}function c(e,t,r,n,i,o,a){return s(e+(t&r|~t&n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return s(e+(t&n|r&~n)+i+o|0,a)+t|0}function u(e,t,r,n,i,o,a){return s(e+(t^r^n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return s(e+(r^(t|~n))+i+o|0,a)+t|0} ``` ```javascript f.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;n=d(n=d(n=d(n=d(n=u(n=u(n=u(n=u(n=h(n=h(n=h(n=h(n=c(n=c(n=c(n=c(n,i=c(i,o=c(o,r=c(r,n,i,o,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),o,r,e[3],3250441966,22),i=c(i,o=c(o,r=c(r,n,i,o,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),o,r,e[7],4249261313,22),i=c(i,o=c(o,r=c(r,n,i,o,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),o,r,e[11],2304563134,22),i=c(i,o=c(o,r=c(r,n,i,o,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),o,r,e[15],1236535329,22),i=h(i,o=h(o,r=h(r,n,i,o,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),o,r,e[0],3921069994,20),i=h(i,o=h(o,r=h(r,n,i,o,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),o,r,e[4],3889429448,20),i=h(i,o=h(o,r=h(r,n,i,o,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),o,r,e[8],1163531501,20),i=h(i,o=h(o,r=h(r,n,i,o,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),o,r,e[12],2368359562,20),i=u(i,o=u(o,r=u(r,n,i,o,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),o,r,e[14],4259657740,23),i=u(i,o=u(o,r=u(r,n,i,o,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),o,r,e[10],3200236656,23),i=u(i,o=u(o,r=u(r,n,i,o,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),o,r,e[6],76029189,23),i=u(i,o=u(o,r=u(r,n,i,o,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),o,r,e[2],3299628645,23),i=d(i,o=d(o,r=d(r,n,i,o,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),o,r,e[5],4237533241,21),i=d(i,o=d(o,r=d(r,n,i,o,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),o,r,e[1],2240044497,21),i=d(i,o=d(o,r=d(r,n,i,o,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),o,r,e[13],1309151649,21),i=d(i,o=d(o,r=d(r,n,i,o,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0} ``` ```javascript f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=f} ```