var vt=Object.defineProperty,a=(t,e)=>vt(t,"name",{value:e,configurable:!0}),L=class{type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(t,e,r,i,h,c){this.type=t,this.name=e,this.prefix=r,this.value=i,this.suffix=h,this.modifier=c}hasCustomName(){return this.name!==""&&typeof this.name!="number"}};a(L,"Part");var xt=/[$_\p{ID_Start}]/u,Et=/[$_\u200C\u200D\p{ID_Continue}]/u,N=".*";function Q(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}a(Q,"isASCII");function F(t,e=!1){let r=[],i=0;for(;i{if(on("OTHER_MODIFIER")??n("ASTERISK"),"tryConsumeModifier"),f=a(p=>{let l=n(p);if(l!==void 0)return l;let{type:m,index:P}=r[o];throw new TypeError(`Unexpected ${m} at ${P}, expected ${p}`)},"mustConsume"),b=a(()=>{let p="",l;for(;l=n("CHAR")??n("ESCAPED_CHAR");)p+=l;return p},"consumeText"),S=a(p=>p,"DefaultEncodePart"),T=e.encodePart||S,U="",O=a(p=>{U+=p},"appendToPendingFixedValue"),D=a(()=>{U.length&&(h.push(new L(3,"","",T(U),"",3)),U="")},"maybeAddPartFromPendingFixedValue"),J=a((p,l,m,P,v)=>{let y=3;switch(v){case"?":y=1;break;case"*":y=0;break;case"+":y=2;break}if(!l&&!m&&y===3){O(p);return}if(D(),!l&&!m){if(!p)return;h.push(new L(3,"","",T(p),"",y));return}let g;m?m==="*"?g=N:g=m:g=i;let A=2;g===i?(A=1,g=""):g===N&&(A=0,g="");let x;if(l?x=l:m&&(x=c++),s.has(x))throw new TypeError(`Duplicate name '${x}'.`);s.add(x),h.push(new L(A,x,T(p),g,T(P),y))},"addPart");for(;o-1)}return o||(i+=`(?=${c}|${h})`),new RegExp(i,j(r))}a(z,"partsToRegexp");var $={delimiter:"",prefixes:"",sensitive:!0,strict:!0},$t={delimiter:".",prefixes:"",sensitive:!0,strict:!0},Rt={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function Z(t,e){return t.length?t[0]==="/"?!0:!e||t.length<2?!1:(t[0]=="\\"||t[0]=="{")&&t[1]=="/":!1}a(z,"isabsolutepathname");function W(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}a(W,"maybeStripPrefix");function tt(t,e){return t.endsWith(e)?t.substr(0,t.length-e.length):t}a(tt,"maybeStripSuffix");function G(t){return!t||t.length<2?!1:t[0]==="["||(t[0]==="\\"||t[0]==="{")&&t[1]==="["}a(g,"treatasipv6hostname");var et=["ftp","file","http","https","ws","wss"];function K(t){if(!t)return!0;for(let e of et)if(t.test(e))return!0;return!1}a(K,"isSpecialScheme");function rt(t,e){if(t=W(t,"#"),e||t==="")return t;let r=new URL("https://example.com");return r.hash=t,r.hash?r.hash.substring(1,r.hash.length):""}a(rt,"canonicalizeHash");function st(t,e){if(t=W(t,"?"),e||t==="")return t;let r=new URL("https://example.com");return r.search=t,r.search?r.search.substring(1,r.search.length):""}a(st,"canonicalizeSearch");function it(t,e){return e||t===""?t:G(t)?B(t):X(t)}a(it,"canonicalizeHostname");function nt(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.password=t,r.password}a(nt,"canonicalizePassword");function at(t,e){if(e||t==="")return t;let r=new URL("https://example.com");return r.username=t,r.username}a(at,"canonicalizeUsername");function ot(t,e,r){if(r||t==="")return t;if(e&&!et.includes(e))return new URL(`${e}:${t}`).pathname;let i=t[0]=="/";return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}a(ot,"canonicalizePathname");function ht(t,e,r){return V(e)===t&&(t=""),r||t===""?t:q(t)}a(ht,"canonicalizePort");function ut(t,e){return t=tt(t,":"),e||t===""?t:I(t)}a(ut,"canonicalizeProtocol");function V(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}a(V,"defaultPortForProtocol");function I(t){if(t==="")return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}a(I,"protocolEncodeCallback");function ct(t){if(t==="")return t;let e=new URL("https://example.com");return e.username=t,e.username}a(ct,"usernameEncodeCallback");function pt(t){if(t==="")return t;let e=new URL("https://example.com");return e.password=t,e.password}a(pt,"passwordEncodeCallback");function X(t){if(t==="")return t;if(/[\t\n\r #%/:?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);let e=new URL("https://example.com");return e.hostname=t,e.hostname}a(X,"hostnameEncodeCallback");function B(t){if(t==="")return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}a(B,"ipv6HostnameEncodeCallback");function q(t){if(t===""||/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}a(q,"portEncodeCallback");function lt(t){if(t==="")return t;let e=new URL("https://example.com");return e.pathname=t[0]!=="/"?"/-"+t:t,t[0]!=="/"?e.pathname.substring(2,e.pathname.length):e.pathname}a(lt,"standardURLPathnameEncodeCallback");function ft(t){return t===""?t:new URL(`data:${t}`).pathname}a(ft,"pathURLPathnameEncodeCallback");function mt(t){if(t==="")return t;let e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}a(mt,"searchEncodeCallback");function dt(t){if(t==="")return t;let e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}a(dt,"hashEncodeCallback");var gt=class{#n;#s=[];#e={};#t=0;#i=1;#u=0;#o=0;#f=0;#m=0;#d=!1;constructor(t){this.#n=t}get result(){return this.#e}parse(){for(this.#s=F(this.#n,!0);this.#t0)if(this.#k())this.#f-=1;else continue;if(this.#P()){this.#f+=1;continue}switch(this.#o){case 0:this.#v()&&this.#l(1);break;case 1:if(this.#v()){this.#S();let t=7,e=1;this.#E()?(t=2,e=3):this.#d&&(t=2),this.#r(t,e)}break;case 2:this.#y()?this.#l(3):(this.#b()||this.#p()||this.#c())&&this.#l(5);break;case 3:this.#$()?this.#r(4,1):this.#y()&&this.#r(5,1);break;case 4:this.#y()&&this.#r(5,1);break;case 5:this.#C()?this.#m+=1:this.#L()&&(this.#m-=1),this.#R()&&!this.#m?this.#r(6,1):this.#b()?this.#r(7,0):this.#p()?this.#r(8,1):this.#c()&&this.#r(9,1);break;case 6:this.#b()?this.#r(7,0):this.#p()?this.#r(8,1):this.#c()&&this.#r(9,1);break;case 7:this.#p()?this.#r(8,1):this.#c()&&this.#r(9,1);break;case 8:this.#c()&&this.#r(9,1);break}}this.#e.hostname!==void 0&&this.#e.port===void 0&&(this.#e.port="")}#r(t,e){switch(this.#o){case 0:break;case 1:this.#e.protocol=this.#h();break;case 2:break;case 3:this.#e.username=this.#h();break;case 4:this.#e.password=this.#h();break;case 5:this.#e.hostname=this.#h();break;case 6:this.#e.port=this.#h();break;case 7:this.#e.pathname=this.#h();break;case 8:this.#e.search=this.#h();break;case 9:this.#e.hash=this.#h();break}this.#o!==0&&t!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(t)&&(this.#e.hostname??=""),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(t)&&(this.#e.pathname??=this.#d?"/":""),[1,2,3,4,5,6,7].includes(this.#o)&&t===9&&(this.#e.search??="")),this.#x(t,e)}#x(t,e){this.#o=t,this.#u=this.#t+e,this.#t+=e,this.#i=0}#w(){this.#t=this.#u,this.#i=0}#l(t){this.#w(),this.#o=t}#g(t){return t<0&&(t=this.#s.length-t),t=0&&(t.pathname=w(i.pathname.substring(0,h+1),r)+t.pathname)}t.pathname=ot(t.pathname,t.protocol,r)}return typeof e.search=="string"&&(t.search=st(e.search,r)),typeof e.hash=="string"&&(t.hash=rt(e.hash,r)),t}a(k,"applyInit");function C(t){return t.replace(/([+*?:{}()\\])/g,"\\1ドル")}a(C,"escapePatternString");function yt(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\1ドル")}a(yt,"escapeRegexpString");function bt(t,e){e.delimiter??="/#?",e.prefixes??="./",e.sensitive??=!1,e.strict??=!1,e.end??=!0,e.start??=!0,e.endsWith="";let r=".*",i=`[^${yt(e.delimiter)}]+?`,h=/[$_\u200C\u200D\p{ID_Continue}]/u,c="";for(let o=0;o0?t[o-1]:null,b=o0?b.value[0]:"";u=h.test(S)}else u=!b.hasCustomName();if(!u&&!s.prefix.length&&f&&f.type===3){let S=f.value[f.value.length-1];u=e.prefixes.includes(S)}u&&(c+="{"),c+=C(s.prefix),n&&(c+=`:${s.name}`),s.type===2?c+=`(${s.value})`:s.type===1?n||(c+=`(${i})`):s.type===0&&(!n&&(!f||f.type===3||f.modifier!==3||u||s.prefix!=="")?c+="*":c+=`(${r})`),s.type===1&&n&&s.suffix.length&&h.test(s.suffix[0])&&(c+="\\"),c+=C(s.suffix),u&&(c+="}"),s.modifier!==3&&(c+=R(s.modifier))}return c}a(bt,"partsToPattern");var wt=class{#n;#s={};#e={};#t={};#i={};#u=!1;constructor(t={},e,r){try{let i;if(typeof e=="string"?i=e:r=e,typeof t=="string"){let s=new gt(t);if(s.parse(),t=s.result,i===void 0&&typeof t.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||typeof t!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let h={ignoreCase:r.ignoreCase===!0},c={pathname:E,protocol:E,username:E,password:E,hostname:E,port:E,search:E,hash:E};this.#n=k(c,t,!0),V(this.#n.protocol)===this.#n.port&&(this.#n.port="");let o;for(o of H){if(!(o in this.#n))continue;let s={},n=this.#n[o];switch(this.#e[o]=[],o){case"protocol":Object.assign(s,$),s.encodePart=I;break;case"username":Object.assign(s,$),s.encodePart=ct;break;case"password":Object.assign(s,$),s.encodePart=pt;break;case"hostname":Object.assign(s,$t),G(n)?s.encodePart=B:s.encodePart=X;break;case"port":Object.assign(s,$),s.encodePart=q;break;case"pathname":K(this.#s.protocol)?(Object.assign(s,Rt,h),s.encodePart=lt):(Object.assign(s,,ドルh),s.encodePart=ft);break;case"search":Object.assign(s,,ドルh),s.encodePart=mt;break;case"hash":Object.assign(s,,ドルh),s.encodePart=dt;break}try{this.#i[o]=M(n,s),this.#s[o]=z(this.#i[o],this.#e[o],s),this.#t[o]=bt(this.#i[o],s),this.#u=this.#u||this.#i[o].some(u=>u.type===2)}catch{throw new TypeError(`invalid ${o} pattern '${this.#n[o]}'.`)}}}catch(i){throw new TypeError(`Failed to construct 'URLPattern': ${i.message}`)}}get[Symbol.toStringTag](){return"URLPattern"}test(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return!1;try{typeof t=="object"?r=k(r,t,!1):r=k(r,_(t,e),!1)}catch{return!1}let i;for(i of H)if(!this.#s[i].exec(r[i]))return!1;return!0}exec(t={},e){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof t!="string"&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof t>"u")return;try{typeof t=="object"?r=k(r,t,!1):r=k(r,_(t,e),!1)}catch{return null}let i={};e?i.inputs=[t,e]:i.inputs=[t];let h;for(h of H){let c=this.#s[h].exec(r[h]);if(!c)return null;let o={};for(let[s,n]of this.#e[h].entries())if(typeof n=="string"||typeof n=="number"){let u=c[s+1];o[n]=u}i[h]={input:r[h]??"",groups:o}}return i}static compareComponent(t,e,r){let i=a((s,n)=>{for(let u of["type","modifier","prefix","value","suffix"]){if(s[u]{let u=0;for(;u

AltStyle によって変換されたページ (->オリジナル) /