mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00
2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
![]() |
import{d as v,j as m,D as g,E as l,g as y,c as E,m as w,q as p,S as N,l as b,F as V,U as C,z as F,L as P,K as A,M as x,k as $}from"./chunk-449c23a2.js";import{_ as j}from"./chunk-6deddc2e.js";import{e as B}from"./chunk-a740628f.js";import{w as M}from"./chunk-4d6daddf.js";import{i as z}from"./chunk-c7e7c785.js";import{_ as S}from"./chunk-92eb22f4.js";import{_ as D}from"./chunk-5ef11c84.js";import{I as R}from"../entries/src_pages_Home.page.16dc467b.js";import"./chunk-9a43cce8.js";import"./chunk-340feaf0.js";import"./chunk-767079b6.js";import"./chunk-f92ba12f.js";import"./chunk-cf010ec4.js";import"./chunk-ee54c1e8.js";const O={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},T=l("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("path",{d:"M5 12h14"}),l("path",{d:"M5 12l6 6"}),l("path",{d:"M5 12l6-6"})],-1),U=[T],W=v({name:"ArrowLeft",render:function(i,f){return m(),g("svg",O,U)}}),q={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},G=l("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("path",{d:"M5 12h14"}),l("path",{d:"M13 18l6-6"}),l("path",{d:"M13 6l6 6"})],-1),K=[G],X=v({name:"ArrowRight",render:function(i,f){return m(),g("svg",q,K)}});var I;(function(){var u,i,f,d,k,_,c,n;n=function(e){var t,s,r,o;return t=(e&255<<24)>>>24,s=(e&255<<16)>>>16,r=(e&65280)>>>8,o=e&255,[t,s,r,o].join(".")},c=function(e){var t,s,r,o,a,h;for(t=[],r=o=0;o<=3&&e.length!==0;r=++o){if(r>0){if(e[0]!==".")throw new Error("Invalid IP");e=e.substring(1)}h=i(e),a=h[0],s=h[1],e=e.substring(s),t.push(a)}if(e.length!==0)throw new Error("Invalid IP");switch(t.length){case 1:if(t[0]>4294967295)throw new Error("Invalid IP");return t[0]>>>0;case 2:if(t[0]>255||t[1]>16777215)throw new Error("Invalid IP");return(t[0]<<24|t[1])>>>0;case 3:if(t[0]>255||t[1]>255||t[2]>65535)throw new Error("Invalid IP");return(t[0]<<24|t[1]<<16|t[2])>>>0;case 4:if(t[0]>255||t[1]>255||t[2]>255||t[3]>255)throw new Error("Invalid IP");return(t[0]<<24|t[1]<<16|t[2]<<8|t[3])>>>0;default:throw new Error("Invalid IP")}},f=function(e){return e.charCodeAt(0)},d=f("0"),_=f("a"),k=f("A"),i=function(e){var t,s,r,o,a;for(o=0,t=10,s="9",r=0,e.length>1&&e[r]==="0"&&(e[r+1]==="x"||e[r+1]==="X"?(r+=2,t=16):"0"<=e[r+1]&&e[r+1]<="9"&&(r++,t=8,s="7")),a=r;r<e.length;){if("0"<=e[r]&&e[r]<=s)o=o*t+(f(e[r])-d)>>>0;else if(t===16)if("a"<=e[r]&&e[r]<="f")o=o*t+(10+f(e[r])-_)>>>0;else if("A"<=e[r]&&e[r]<="F")o=o*t+(10+f(e[r])-k)>>>0;else break;else break;if(o>4294967295)throw new Error("too large");r++}if(r===a)throw new Error("empty octet");return[o,r]},u=function(){function e(t,s){var r,o,a;if(typeof t!="string")throw new Error("Missing `net' parameter");if(s||(a=t.split("/",2),t=a[0],s=a[1]),s||(s=32),typeof s=="string"&&s.indexOf(".")>-1){try{this.maskLong=c(s)}catch{throw new Error("Invalid mask: "+s)}for(r=o=32;o>=0;r=--o)if(this.maskLong===4294967295<<32-r>>>0){this.bitmask=r;break}}else if(s||s===0)this.bitmask=parseInt(s,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0);else throw new Error("Invalid mask: empty");try{this.netLong=(c(t)&this.maskLong)>>>0}catch{throw new Error("Invalid net address: "+t)}if(!(this.bitmask<=32))throw new Error("Invalid mask for ip4: "+s);this.size=Math.pow(2,32-this.bitmask),this.base=n(this.netLong),this.mask=n(this.maskLong),this.hostmask=n(~this.maskLong),this.first=this.bitmask<=30?n(this.netLong+1):this.base,this.last=this.bitmask<=30?n(this.netLong+this.size-2):n(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?n(this.netLong+this.size-1):void 0}return e.prototype.contains=function(t){return typeof t=="string"&&(t.indexOf("/")>0||t.split(".").length!==4)&&(t=new e(t)),t instanceof e?this.contains(t.base)&&this.contains(t.broadcast||t.last):(c(t)&this.maskLong)>>>0===(this.netLong&this.maskLong)>>>0},e.prototype.next=function(t){return t==null&&(t=1),new e(n(this.netLong+this.size*t),this.ma
|