(self.webpackChunkui=self.webpackChunkui||[]).push([[25],{91:function(r,t,n){"use strict";var e=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(t,"__esModule",{value:!0}),t.convertWeightsToThresholds=t.assignWeighted=t.sampleN=t.showCanary=t.assignUniform=t.uniformIndex=void 0;const o=e(n(57));function u(r,t){if(0===t)return 0;const n=BigInt(`0x${(0,o.default)(r).substr(0,15)}`);return Number(n%BigInt(t))}function i(r){const t={};let n=0,e=0;return[...new Set(r)].sort(((r,t)=>r-t)).forEach((o=>{const u=r.filter((r=>r>=o)).map((r=>r-e)),i=(1-n)*function(r){return Math.min(...r)/r.reduce(((r,t)=>r+t),0)*r.length}(u);e=o,n+=i,t[o]=n})),r.map((r=>Math.round(100*t[r])))}t.uniformIndex=u,t.assignUniform=function(r,t){return t[u(r,t.length)]},t.showCanary=function(r,t=0){return t>0&&u(r,100)0&&t.length>0;){const o=u(r,t.length),i=t.splice(o,1)[0];e.push(i),n--}return e},t.assignWeighted=function(r,t){const n=i(t.map((r=>r.weight))),e=u(r,100),o=[...t];for(;o.length>1;){const t=u(r,o.length),i=o.splice(t,1)[0],s=n.splice(t,1)[0];if(i&&e{var t={utf8:{stringToBytes:function(r){return t.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(t.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var t=[],n=0;n{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(r,t){return r<>>32-t},rotr:function(r,t){return r<<32-t|r>>>t},endian:function(r){if(r.constructor==Number)return 16711935&n.rotl(r,8)|4278255360&n.rotl(r,24);for(var t=0;t0;r--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(r){for(var t=[],n=0,e=0;n>>5]|=r[n]<<24-e%32;return t},wordsToBytes:function(r){for(var t=[],n=0;n<32*r.length;n+=8)t.push(r[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(r){for(var t=[],n=0;n>>4).toString(16)),t.push((15&r[n]).toString(16));return t.join("")},hexToBytes:function(r){for(var t=[],n=0;n>>6*(3-u)&63)):n.push("=");return n.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],e=0,o=0;e>>6-2*o);return n}},r.exports=n},132:r=>{"use strict";r.exports=function(r,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,e="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(n=t.cmp,function(r){return function(t,e){var o={key:t,value:r[t]},u={key:e,value:r[e]};return n(o,u)}}),u=[];return function r(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,i;if(Array.isArray(t)){for(i="[",n=0;n{var e,o,u,i;e=n(131),o=n(92).utf8,u=n(92).bin,(i=function(r,t){var n=e.wordsToBytes(function(r){r.constructor==String?r=o.stringToBytes(r):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(r)?r=Array.prototype.slice.call(r,0):Array.isArray(r)||(r=r.toString());var t=e.bytesToWords(r),n=8*r.length,u=[],i=1732584193,s=-271733879,f=-1732584194,c=271733878,a=-1009589776;t[n>>5]|=128<<24-n%32,t[15+(n+64>>>9<<4)]=n;for(var l=0;l>>31}var m=(i<<5|i>>>27)+a+(u[v]>>>0)+(v<20?1518500249+(s&f|~s&c):v<40?1859775393+(s^f^c):v<60?(s&f|s&c|f&c)-1894007588:(s^f^c)-899497514);a=c,c=f,f=s<<30|s>>>2,s=i,i=m}i+=h,s+=g,f+=p,c+=y,a+=d}return[i,s,f,c,a]}(r));return t&&t.asBytes?n:t&&t.asString?u.bytesToString(n):e.bytesToHex(n)})._blocksize=16,i._digestsize=20,r.exports=i}}]);