Merge remote-tracking branch 'origin/main' into keyboard-shortcuts

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Charlie Allom 2026-11-03 10:39:00 +00:00
commit a0acb27c7a
No known key found for this signature in database
26 changed files with 1661 additions and 96 deletions

View file

@ -10,6 +10,7 @@ const CITY_LL={
"anc":[-149.9,61.22],
"apw":[-171.76,-13.83],
"ash":[-77.49,39.04],
"asp":[133.88,-23.7],
"asu":[-57.58,-25.26],
"ath":[23.73,37.98],
"atn":[-84.39,33.75],
@ -172,6 +173,7 @@ const CITY_LL={
"pdl":[-25.67,37.74],
"pek":[116.4,39.9],
"per":[115.86,-31.95],
"phe":[118.61,-20.31],
"phx":[-112.07,33.45],
"pkc":[158.65,53.02],
"pmo":[13.36,38.12],
@ -228,6 +230,7 @@ const CITY_LL={
"tok":[139.69,35.69],
"tor":[-79.38,43.65],
"tpe":[121.56, 25.03],
"tsv":[146.82,-19.26],
"tun":[10.18,36.81],
"uio":[-78.47,-0.18],
"uus":[142.74,46.96],

View file

@ -144,7 +144,7 @@ const CITIES=[
{id:'gbe',name:'Gaborone',x:0,y:0,land:'af',reg:'AF',P:25,cc:'BW',ix:'Seswaa-IX',dc:'Diamond Dust DC',note:tr('cities.botswana_quiet_safe_and_rich_in')},
{id:'mel',name:'Melbourne',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,arpu:AU_ARPU,P:450,ix:'Flat-White-IX',dc:'Four-Seasons-a-Day DC',dc2:'Next-Door-DC M#',dc2N:3,note:tr('cities.four_seasons_in_one_day_and')},
{id:'bne',name:'Brisbane',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,arpu:AU_ARPU,P:250,ix:'Bris-Vegas-IX',dc:'Sunshine State Shed',dc2:'Next-Door-DC B#',dc2N:2,note:tr('cities.brisvegas_big_sky_a_thunderstorm_at')},
{id:'drw',name:'Darwin',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,arpu:AU_ARPU,P:15,ix:'Gator-IX',dc:'Crocodile-proof Landing Station',note:tr('cities.tiny_tropical_and_the_closest')},
{id:'drw',name:'Darwin',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,wet:true,arpu:AU_ARPU,P:15,ix:'Gator-IX',dc:'Crocodile-proof Landing Station',note:tr('cities.tiny_tropical_and_the_closest')},
{id:'adl',name:'Adelaide',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,arpu:AU_ARPU,P:150,ix:'Vineyard-IX',dc:'OurDC',dc2:'Next-Door-DC A1',note:tr('cities.twenty_minutes_from_everything')},
{id:'cbr',capital:true,name:'Canberra',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,arpu:AU_ARPU,P:50,ix:'Capital-IX',dc:'Classified Data Cupboard',dc2:'Next-Door-DC C1',note:tr('cities.built_for_the_government_the_data')},
{id:'chc',name:'Christchurch',x:0,y:0,land:'nzs',reg:'OC',cc:'NZ',P:40,ix:'Garden-City-IX',dc:'Mainland Colo',note:tr('cities.the_garden_city_and_the_biggest')},
@ -243,6 +243,9 @@ const CITIES=[
// The Philippines beyond Luzon
{id:'ceb',name:'Cebu',x:0,y:0,land:'ceb',reg:'AS',cc:'PH',ph:true,arpu:PH_ARPU,P:125,ix:'GotchaFIX Cebu',ixCheap:1.8,dc:"Magellan's Last Rack",note:tr('cities.the_philippines_second_city_reached')},
{id:'dvo',name:'Davao',x:0,y:0,land:'mdn',reg:'AS',cc:'PH',ph:true,arpu:PH_ARPU,P:135,ix:'GotchaFIX Davao',ixCheap:1.8,dc:"Heimdall's Hut",note:tr('cities.mindanao_s_big_city_and_the')},
{id:'phe',name:'Port Hedland',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,wet:true,arpu:AU_ARPU,P:2,ix:'',dc:'Next-Door-DC PH1',note:tr('cities.iron_ore_red_dust_and_two')},
{id:'tsv',name:'Townsville',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,wet:true,arpu:AU_ARPU,P:20,ix:'',dc:'DigiCroc TSV1',note:tr('cities.north_queensland_s_capital_in_waiting')},
{id:'asp',name:'Alice Springs',x:0,y:0,land:'oc',reg:'OC',cc:'AU',au:true,arpu:AU_ARPU,P:3,ix:'',dc:'Old Telegraph Station',note:tr('cities.the_middle_of_everywhere_no_sea')},
];
// Display-only nudges for cities that sit on top of each other at map scale; distances still use real lon/lat.
const CITY_NUDGE={

View file

@ -15,6 +15,7 @@ const CITY_PDB={
anc:[3,12,33300], // est.
apw:[0,0,11],
ash:[86,1010,33300],
asp:[0,0,3196], // est.: no carrier-neutral facility, the incumbent's exchange
asu:[3,8,124],
ath:[6,108,307],
atn:[42,589,33300],
@ -177,6 +178,7 @@ const CITY_PDB={
pdl:[1,3,187], // est.
pek:[10,15,6717],
per:[12,248,3196],
phe:[1,3,3196], // est.: one carrier-neutral facility
phx:[26,279,33300],
pkc:[1,2,6683], // est.
pmo:[3,46,1534],
@ -233,6 +235,7 @@ const CITY_PDB={
tok:[58,917,1330],
tor:[46,509,2595],
tpe:[15,274,500],
tsv:[1,2,3196], // est.
tun:[2,0,30],
uio:[9,16,287],
uus:[1,3,6683], // est.

View file

@ -62,7 +62,8 @@ const CABLES=[
{"id":"tse","name":"Strait Outta Taipei","price":1.5,"age":"old","blurb":tr('cables.a_short_cable_across_a_very'),"pairs":[["tpe","sha",[[122.2,26.5],[122.6,29],[122.2,31]]]]},
{"id":"gbi","name":"Gulf Bridge Over Troubled Water","price":1.0,"age":"mid","blurb":tr('cables.leaves_the_gulf_from_fujairah_and'),"pairs":[["fuj","mrs",[[56.5,25],[56.75,25],[57,25],[58,24.5],[59,24],[59.75,23.25],[60.5,22.5],[60.24,22.11],[59.99,21.72],[59.74,21.34],[59.49,20.95],[59.24,20.56],[58.99,20.17],[58.74,19.78],[58.5,19.39],[58.25,19],[57.5,18.25],[57.08,17.96],[56.66,17.67],[56.24,17.38],[55.83,17.09],[55.41,16.79],[55,16.5],[54.55,16.28],[54.09,16.06],[53.64,15.83],[53.19,15.61],[52.74,15.39],[52.29,15.16],[51.84,14.93],[51.39,14.71],[50.95,14.48],[50.5,14.25],[49.5,13.88],[48.5,13.5],[47.5,13.13],[46.5,12.75],[45.5,12.38],[44.5,12],[44,12],[43.75,12.25],[43.5,12.5],[43.25,12.75],[43.25,13],[43.25,13.25],[43,13.5],[42.75,13.75],[42.5,14],[42.26,14.43],[42.02,14.86],[41.78,15.3],[41.54,15.73],[41.3,16.16],[41.05,16.59],[40.81,17.02],[40.56,17.45],[40.31,17.88],[40.06,18.31],[39.82,18.74],[39.56,19.17],[39.31,19.6],[39.06,20.03],[38.8,20.46],[38.55,20.88],[38.29,21.31],[38.03,21.74],[37.77,22.17],[37.51,22.59],[37.24,23.02],[36.98,23.44],[36.71,23.87],[36.44,24.29],[36.17,24.72],[35.89,25.14],[35.62,25.56],[35.34,25.99],[35.06,26.41],[34.78,26.83],[34.5,27.25],[34.25,27.5],[34,27.75],[33.75,28],[33.5,28.25],[33.25,28.5],[33,28.75],[33,29],[32.75,29.25],[32.5,29.5],[32.5,29.75],[32.5,30.5],[32.5,31.25],[32.25,31.5],[32,31.75],[31.6,32.11],[31.2,32.47],[30.8,32.83],[30.39,33.19],[29.98,33.55],[29.56,33.9],[29.14,34.25],[28.72,34.61],[28.3,34.96],[27.87,35.31],[27.44,35.65],[27,36],[26.43,36.01],[25.86,36.01],[25.29,36.02],[24.71,36.02],[24.14,36.01],[23.57,36.01],[23,36],[22,36],[21.42,36.02],[20.83,36.03],[20.25,36.04],[19.67,36.05],[19.08,36.05],[18.5,36.05],[17.92,36.05],[17.33,36.05],[16.75,36.04],[16.17,36.03],[15.58,36.02],[15,36],[14.07,36.36],[13.14,36.71],[12.21,37.07],[11.29,37.43],[10.36,37.79],[9.43,38.14],[8.5,38.5],[7.75,39.25],[7.45,39.69],[7.15,40.13],[6.84,40.57],[6.53,41.01],[6.22,41.44],[5.9,41.88],[5.58,42.32],[5.25,42.75],[5.25,43],[5.25,43.25]]]]},
{"id":"aagony","name":"AAG-ony","price":1.1,"age":"old","blurb":tr('cables.an_asia_america_gateway_cable_that'),"pairs":[["sgn","hkg",[[108,10],[109.75,11.5]]],["sgn","sin",[[106,7],[104.6,3]]]]},
{"id":"darwin","name":"Darwin Award Cable","price":1.0,"age":"new","blurb":tr('cables.darwin_to_singapore_via_jakarta'),"pairs":[["drw","jkt",[[117,-10],[114.25,-7.25],[111.75,-6],[107.5,-5.5]]],["drw","sin",[[117,-10]]]]},
{"id":"darwin","name":"Darwin Award Cable","price":1.0,"age":"new","blurb":tr('cables.darwin_to_singapore_via_jakarta'),"pairs":[["drw","jkt",[[117,-10],[114.25,-7.25],[111.75,-6],[107.5,-5.5]]],["drw","sin",[[117,-10]]],["phe","sin",[[118.25,-19.5],[117,-10]]]]},
{"id":"nwcs","name":"No Worries Cable System","price":1.0,"age":"mid","blurb":tr('cables.darwin_to_port_hedland_past_the'),"pairs":[["drw","phe",[[130.25,-12],[128,-12.75],[124.5,-14.25],[121.5,-17.25],[119,-19.5]]]]},
{"id":"jga","name":"J-G’day-A (Japan–Guam–Aussie)","price":0.9,"age":"new","blurb":tr('cables.brisbane_to_tokyo_with_a_beach'),"pairs":[["bne","tok",[[155,-25],[156,-5],[146,13],[141,30]]],["bne","gum",[[155,-25],[156,-5],[146,12.8]]],["gum","tok",[[145.3,14.5],[141,30]]]]},
{"id":"smw4","name":"SEE-ME-WAVE 4","price":1.2,"age":"old","blurb":tr('cables.the_previous_generation_still'),"pairs":[["khi","mrs",[[66.75,24.75],[66.5,24.75],[65.54,24.06],[64.58,23.38],[63.63,22.69],[62.67,22],[61.71,21.31],[60.75,20.63],[59.79,19.94],[58.83,19.25],[57.88,18.56],[56.92,17.88],[55.96,17.19],[55,16.5],[54.55,16.28],[54.09,16.06],[53.64,15.83],[53.19,15.61],[52.74,15.39],[52.29,15.16],[51.84,14.93],[51.39,14.71],[50.95,14.48],[50.5,14.25],[49.5,13.88],[48.5,13.5],[47.5,13.13],[46.5,12.75],[45.5,12.38],[44.5,12],[44,12],[43.75,12.25],[43.5,12.5],[43.25,12.75],[43.25,13],[43.25,13.25],[43,13.5],[42.75,13.75],[42.5,14],[42.26,14.43],[42.02,14.86],[41.78,15.3],[41.54,15.73],[41.3,16.16],[41.05,16.59],[40.81,17.02],[40.56,17.45],[40.31,17.88],[40.06,18.31],[39.82,18.74],[39.56,19.17],[39.31,19.6],[39.06,20.03],[38.8,20.46],[38.55,20.88],[38.29,21.31],[38.03,21.74],[37.77,22.17],[37.51,22.59],[37.24,23.02],[36.98,23.44],[36.71,23.87],[36.44,24.29],[36.17,24.72],[35.89,25.14],[35.62,25.56],[35.34,25.99],[35.06,26.41],[34.78,26.83],[34.5,27.25],[34.25,27.5],[34,27.75],[33.75,28],[33.5,28.25],[33.25,28.5],[33,28.75],[33,29],[32.75,29.25],[32.5,29.5],[32.5,29.75],[32.5,30.5],[32.5,31.25],[32.25,31.5],[32,31.75],[31.6,32.11],[31.2,32.47],[30.8,32.83],[30.39,33.19],[29.98,33.55],[29.56,33.9],[29.14,34.25],[28.72,34.61],[28.3,34.96],[27.87,35.31],[27.44,35.65],[27,36],[26.43,36.01],[25.86,36.01],[25.29,36.02],[24.71,36.02],[24.14,36.01],[23.57,36.01],[23,36],[22,36],[21.42,36.02],[20.83,36.03],[20.25,36.04],[19.67,36.05],[19.08,36.05],[18.5,36.05],[17.92,36.05],[17.33,36.05],[16.75,36.04],[16.17,36.03],[15.58,36.02],[15,36],[14.07,36.36],[13.14,36.71],[12.21,37.07],[11.29,37.43],[10.36,37.79],[9.43,38.14],[8.5,38.5],[7.75,39.25],[7.45,39.69],[7.15,40.13],[6.84,40.57],[6.53,41.01],[6.22,41.44],[5.9,41.88],[5.58,42.32],[5.25,42.75],[5.25,43],[5.25,43.25]]],["khi","bom",[[67,23],[70,20.5]]],["bom","cbo",[[72,15],[75,8],[78.5,6.3]]],["cbo","maa",[[80.6,8.6],[81,11.5]]],["maa","dac",[[89.5,21.5]]],["dac","sin",[[91.5,22.75],[91.25,22],[93.75,16.5],[97.75,12.5],[97.75,8.25],[100.5,3.5],[102.75,1.25]]],["mrs","pmo",[[5.25,42.75],[9,38.25]]],["pmo","cai",[[12,38],[13.25,36.75],[29.5,31.5]]],["cai","jed",[[32.5,29.75],[33,28.75]]],["jed","fuj",[[39,21.5],[38.75,21.25],[38.75,21],[38.99,20.56],[39.24,20.13],[39.48,19.69],[39.72,19.26],[39.95,18.82],[40.19,18.38],[40.43,17.95],[40.66,17.51],[40.89,17.07],[41.13,16.63],[41.36,16.19],[41.59,15.76],[41.82,15.32],[42.05,14.88],[42.27,14.44],[42.5,14],[42.75,13.75],[43,13.5],[43.25,13.25],[43.25,13],[43.25,12.75],[43.5,12.5],[43.75,12.25],[44,12],[44.5,12],[45.5,12.38],[46.5,12.75],[47.5,13.13],[48.5,13.5],[49.5,13.88],[50.5,14.25],[50.95,14.48],[51.39,14.71],[51.84,14.93],[52.29,15.16],[52.74,15.39],[53.19,15.61],[53.64,15.83],[54.09,16.06],[54.55,16.28],[55,16.5],[55.41,16.79],[55.83,17.09],[56.24,17.38],[56.66,17.67],[57.08,17.96],[57.5,18.25],[58.25,19],[58.5,19.39],[58.74,19.78],[58.99,20.17],[59.24,20.56],[59.49,20.95],[59.74,21.34],[59.99,21.72],[60.24,22.11],[60.5,22.5],[59.75,23.25],[59,24],[58,24.5],[57,25],[56.75,25],[56.5,25]]],["fuj","khi",[[62.5,24.5]]]]},
{"id":"balt","anchor":true,"name":"Baltic Anchor Magnet","price":0.8,"age":"mid","blurb":tr('cables.short_hops_under_the_baltic_sea'),"pairs":[["tll","hel",[[24.8,59.8]]],["tll","sto",[[22,59.3],[19.5,59.3]]]]},

View file

@ -43,7 +43,7 @@ NETS.push(
{id:'dto',name:'Ditto',asn:139831,type:'eye',cc:'PH',pol:'open',up:['ntt','tat'],share:.002,col:'#B5121B',pops:['mnl'],ix:['mnl','mnl~2'],blurb:tr('networks.the_third_mobile_network_same_towers')},
{id:'rsh',name:'RISE & Shine',asn:63927,type:'eye',cc:'PH',pol:'open',up:['ntt','tat'],share:.002,col:'#F5A623',pops:['mnl','ceb','dvo','sin','hkg','fra','ams','lon','sto'],ix:['mnl','mnl~2','mnl~3','ceb','dvo','sin','sin~2','hkg','hkg~2','fra','ams','lon','sto'],blurb:tr('networks.up_early_in_cebu_and_already')},
{id:'spk',name:'Spark-le',asn:4771,type:'eye',cc:'NZ',pol:'open',share:.005,col:'#6A2C91',pops:['akl','syd','chc','ivc'],ix:['akl','syd','chc'],blurb:tr('networks.new_zealand_s_shiniest_isp')},
{id:'tsy',name:'Telstraya',asn:1221,type:'t2',cc:'AU',pol:'selective',minIx:15,minPni:40,share:.01,price:9,col:'#0099F8',pops:['hnl','gum','suv','pom','nou','hir','syd','per','sin','hkg','lax','tpe','mel','bne','drw','adl','cbr','hba'],ix:['gum','sin','hkg'],blurb:tr('networks.australia_s_big_one_g_day')});
{id:'tsy',name:'Telstraya',asn:1221,type:'t2',cc:'AU',pol:'selective',minIx:15,minPni:40,share:.01,price:9,col:'#0099F8',pops:['hnl','gum','suv','pom','nou','hir','syd','per','sin','hkg','lax','tpe','mel','bne','drw','adl','cbr','hba','phe','tsv','asp'],ix:['gum','sin','hkg'],blurb:tr('networks.australia_s_big_one_g_day')});
NETS.push(
{id:'liq',name:'Liquid Lunch Networks',asn:30846,type:'t2',cc:['ZW'],pol:'open',up:['tat','tly'],share:.006,price:6,col:'#00A0DF',pops:['jnb','cpt','dur','hre','lun','gbe','mpm','dar','nbo','mba','kla','kgl','fih','add','jib','cai','wdh'],ix:['jnb','cpt','dur','hre','lun','gbe','mpm','dar','nbo','mba','kla','kgl','fih','add','jib','cai','wdh'],blurb:tr('networks.cape_to_cairo_fiber_across_a')},
{id:'scm',name:'Sea-Comedy Networks',asn:37102,type:'t2',pol:'open',up:['ntt','tat'],share:.005,price:5,col:'#1C3F94',pops:['jnb','cpt','dur','mpm','dar','mba','nbo','kla','kgl','jib','cai','mrs','bom','lon'],ix:['jnb','cpt','dur','mpm','dar','mba','nbo','kla','jib','mrs'],blurb:tr('networks.owns_the_cable_that_brought_east')},
@ -74,8 +74,8 @@ NETS.push(
{id:'kdi',name:'KD-DIY',asn:2561,type:'t2',cc:'JP',pol:'selective',minIx:10,minPni:30,share:.008,price:6,col:'#E85D04',pops:['tok','osa','lax','sin','hkg','fuk'],ix:['tok','osa','fuk'],blurb:tr('networks.japanese_carrier_that_builds')},
{id:'opt',name:'Floptus',asn:4804,type:'eye',cc:'AU',pol:'selective',minIx:8,minPni:25,share:.006,up:['sgt'],col:'#00837E',pops:['syd','mel','bne','per'],ix:[],blurb:tr('networks.australia_s_number_two_once_took')},
{id:'tpr',name:'Toilet Paper Group',asn:7545,type:'eye',cc:'AU',pol:'selective',minIx:8,minPni:25,share:.0035,col:'#4E2A84',pops:['syd','mel','bne','per','adl','cbr'],ix:[],blurb:tr('networks.stockpiled_bandwidth_in_2020_and')},
{id:'abb',name:'Aussie Boyband',asn:4764,type:'eye',cc:'AU',pol:'open',share:.002,col:'#00B140',pops:['syd','mel','bne','per','adl','cbr','drw','hba'],ix:['syd','mel','bne','per','adl','drw'],blurb:tr('networks.matching_outfits_perfect_harmonies')},
{id:'voc',name:'Hocus Pocus',asn:4826,type:'t2',pol:'open',up:['ntt','tly'],share:.002,price:7,col:'#E4002B',pops:['syd','mel','bne','per','adl','cbr','drw','hba','sin'],ix:['syd','mel','bne','per','adl','hba','drw','sin'],blurb:tr('networks.now_you_see_the_fibre_now')},
{id:'abb',name:'Aussie Boyband',asn:4764,type:'eye',cc:'AU',pol:'open',share:.002,col:'#00B140',pops:['syd','mel','bne','per','adl','cbr','drw','hba','tsv'],ix:['syd','mel','bne','per','adl','drw'],blurb:tr('networks.matching_outfits_perfect_harmonies')},
{id:'voc',name:'Hocus Pocus',asn:4826,type:'t2',pol:'open',up:['ntt','tly'],share:.002,price:7,col:'#E4002B',pops:['syd','mel','bne','per','adl','cbr','drw','hba','sin','phe','tsv'],ix:['syd','mel','bne','per','adl','hba','drw','sin'],blurb:tr('networks.now_you_see_the_fibre_now')},
{id:'ddo',name:'Doodoo',asn:9443,type:'eye',cc:'AU',pol:'open',up:['voc'],share:.0011,col:'#FFC20E',pops:['syd','mel','bne','per','adl'],ix:[],blurb:tr('networks.the_cheapest_plan_in_the_country')},
{id:'stb',name:'Musklink',asn:14593,type:'eye',cc:'US',pol:'selective',minIx:3,minPni:10,share:.001,col:'#1B1F24',pops:['syd','mel','bne','per','drw','sea','lax','dal','chi','ash'],ix:['mel','bne','per','drw'],blurb:tr('networks.beams_the_outback_online_from_550')},
{id:'spl',name:'Speedyloop',asn:38195,type:'t2',cc:'AU',pol:'open',up:['tly'],share:.001,price:6,col:'#FF5F00',pops:['syd','mel','bne','per','adl','sin','hkg','cbr','drw'],ix:['mel','bne','per','adl','hba','drw','sin','hkg'],blurb:tr('networks.speedy_by_name_owns_a_slice')},

View file

@ -40,7 +40,7 @@ function traceroute(src,to){const P=trPaths(src),me=slug(S.name)+'.net',lines=[]
else if(e.k==='p'){hop(`pni-${slug(NET[e.via||N.id].name)}.${e.city}.${me}`,ip(hstr(N.id),3),0.2,tr('traceroute.private_cross_connect'));}
// Down the cone one customer at a time: the shortest chain of upstreams from the peer to the network, each AS on the path.
if(e.via){const ch=coneChain(e.via,N.id);for(let i=0;i<ch.length-1;i++){const V=NET[ch[i]],C=NET[ch[i+1]];asPath.push(V.asn);hop(`${slug(C.name)}-cust.${e.city}.${slug(V.name)}.net`,`198.51.100.${(hstr(V.id)+3)%250}`,1.2,tr('traceroute.net_hands_it_to_its_customer',{net:V.name,to:C.name}));}}
else{hop(`cache-${slug(N.name)}.${e.city}.${me}`,ip(hstr(N.id),4),0.1,tr('traceroute.embedded_cache_in_your_rack'));}
else if(e.k==='c'){hop(`cache-${slug(N.name)}.${e.city}.${me}`,ip(hstr(N.id),4),0.1,tr('traceroute.embedded_cache_in_your_rack'));}
asPath.push(N.asn);if(e.k!=='c')hop(`www.${slug(N.name)}.example`,`198.51.100.${(hstr(N.id)+1)%250}`,0.5+(e.k==='t'?1:0.2),`${N.name}`);
const order=e.via?tr('traceroute.a_peer_s_customers_come_after'):{c:tr('traceroute.caches_beat_pnis'),p:tr('traceroute.pnis_beat_ix_peering'),ix:tr('traceroute.ix_peering_beats_transit'),t:tr('traceroute.transit_is_the_last_resort')}[e.k];
const cn=cnCity(src)!==!!N.cn?' '+tr('traceroute.crossing_the_great_firewall_here',{p:S.ev.gfw>S.day?35:20}):'';

View file

@ -1,5 +1,7 @@
// Anchors Away (Baltic): a link on an anchor-prone cable, or on a pair one serves (the map calls those overland).
const anchorProne=l=>!!(l.cable&&CAB[l.cable]&&CAB[l.cable].anchor)||anchorPair(l);
// The wet season in the tropical north (November to April): floods close the tracks, so a cut on land takes twice as long to reach.
const wetSeason=()=>{const m=cal(S.day).m;return m>=10||m<=3;},wetCut=l=>!l.sub&&!!(CITY[l.a].wet||CITY[l.b].wet)&&wetSeason();
function fireFailure(only){
const opts=[];
const live=S.links.filter(l=>l.kind!=='vxc'&&!linkDown(l));const fabsUsed=[...new Set(S.links.filter(l=>l.kind==='vxc').map(l=>l.prov))];
@ -81,9 +83,9 @@ function fireFailure(only){
addInc({type,ref:l.id,until:S.day+dur,msg:pick([tr('failures.a_optic_on_a_b_overheated',{optic:OPT[o].n,a:A,b:B}),tr('failures.the_laser_in_a_optic_on',{optic:OPT[o].n,a:A,b:B}),tr('failures.a_optic_on_a_b_started',{optic:OPT[o].n,a:A,b:B})])+(l.spares?' '+tr('failures.swapped_from_your_spares_kit_by'):''),cost:l.spares?0:OPT[o].cost,fix:tr('failures.buy_a_replacement')});
}else if(type==='cut'){
const mon=cal(S.day).m,monsoon=mon>=5&&mon<=8,tw=x=>(x.sub&&(x.a==='tpe'||x.b==='tpe'||(x.cable&&CAB[x.cable].anchor)))||(scnRule('anchors')&&anchorProne(x)),vn=x=>x.sub&&(x.a==='sgn'||x.b==='sgn'),inl=x=>!x.sub&&(CITY[x.a].india||CITY[x.b].india);
const pool=only&&scnRule('anchors')?live.filter(anchorProne):live;if(!pool.length)return;const l=pick(pool.flatMap(x=>{const w=(x.cable&&CAB[x.cable].age==='old'?3:1)*(x.cable&&CAB[x.cable].fragile?3:1)*(tw(x)?4*(scnRule('anchors')?3:1):1)*(scnRule('sharks')&&x.sub?2:1)*(vn(x)?3:1)*(!x.sub&&andesPair(x.a,x.b)?4:1)*(monsoon&&inl(x)?3:1)*(x.sub&&(x.a==='oos'||x.b==='oos')?3:1);return Array(w).fill(x);})),dur=10+Math.floor(Math.random()*8),trc=l.trench||l.id,hit=S.links.filter(x=>(x.trench||x.id)===trc);hit.forEach(x=>x.cut=Math.max(x.cut||0,S.day+dur));
const pool=only&&scnRule('anchors')?live.filter(anchorProne):live;if(!pool.length)return;const l=pick(pool.flatMap(x=>{const w=(x.cable&&CAB[x.cable].age==='old'?3:1)*(x.cable&&CAB[x.cable].fragile?3:1)*(tw(x)?4*(scnRule('anchors')?3:1):1)*(scnRule('sharks')&&x.sub?2:1)*(vn(x)?3:1)*(!x.sub&&andesPair(x.a,x.b)?4:1)*(monsoon&&inl(x)?3:1)*(x.sub&&(x.a==='oos'||x.b==='oos')?3:1);return Array(w).fill(x);})),dur=(10+Math.floor(Math.random()*8))*(wetCut(l)?2:1),trc=l.trench||l.id,hit=S.links.filter(x=>(x.trench||x.id)===trc);hit.forEach(x=>x.cut=Math.max(x.cut||0,S.day+dur));
const A=CITY[l.a].name,B=CITY[l.b].name,au=CITY[l.a].au&&CITY[l.b].au,auSummer=mon>=11||mon<=1;
const en=l.sub&&(CITY[l.a].au||CITY[l.b].au)&&!(l.cable&&CAB[l.cable].fragile)&&Math.random()<0.35?pick([N_('failures.box_jellyfish_season_at_the_a'),N_('failures.a_great_white_took_an_interest')]):l.cable&&CAB[l.cable].fragile&&Math.random()<0.8?pick([N_('failures.your_a_b_cable_is_cut'),N_('failures.a_b_is_down_same_cable')]):!l.sub&&CITY[l.a].land==='nzs'&&CITY[l.b].land==='nzs'&&Math.random()<0.75?pick([N_('failures.a_kea_pulled_the_rubber_seals'),N_('failures.the_sandflies_drove_your_splicing'),N_('failures.a_farmer_s_post_hole_digger')]):l.cable==='cook'&&Math.random()<0.6?N_('failures.a_ferry_dropped_anchor_in_cook'):!l.sub&&au&&Math.random()<0.75?pick([N_('failures.a_sulphur_crested_cockatoo_chewed'),N_('failures.a_kangaroo_hit_the_fiber_hut'),N_('failures.thieves_dug_up_your_a_b'),N_('failures.a_kilometre_of_copper_went_missing'),N_('failures.a_backhoe_putting_in_a_new'),N_('failures.the_emus_won_again_a_mob'),N_('failures.a_kangaroo_boxed_your_field_tech'),N_('failures.a_drop_bear_fell_on_the'),N_('failures.an_eastern_brown_snake_moved_into'),...((S.day%365)/30.42>=8&&(S.day%365)/30.42<11?[N_('failures.magpie_swooping_season_the_field')]:[]),...(auSummer?[N_('failures.bushfire_season_the_fiber_along_a')]:[]),...(nullPair(l.a,l.b)?[N_('failures.your_a_b_fiber_broke_somewhere')]:[])]):l.sub&&(l.a==='bda'||l.b==='bda')&&Math.random()<0.7?pick([N_('failures.your_a_b_cable_went_quiet'),N_('failures.the_repair_ship_s_compass_spun')]):l.sub&&(l.a==='tbu'||l.b==='tbu')&&Math.random()<0.7?pick([N_('failures.an_undersea_volcano_erupted_next_to'),N_('failures.the_seabed_off_tonga_slid_down')]):vn(l)&&Math.random()<0.8?pick([N_('failures.another_of_vietnam_s_subsea_cables'),N_('failures.your_a_b_cable_broke_in')]):!l.sub&&(l.a==='drw'||l.b==='drw')&&Math.random()<0.7?pick([N_('failures.a_crocodile_took_a_bite_out'),N_('failures.termites_ate_the_duct_on_a')]):tw(l)&&Math.random()<0.8?pick([N_('failures.a_cargo_ship_forgot_to_raise'),N_('failures.another_anchor_another_cut_your_a'),N_('failures.a_fishing_boat_with_an_unusually')]):l.sub&&(l.a==='oos'||l.b==='oos')&&Math.random()<0.8?pick([N_('failures.a_trawler_off_ostend_dragged_its'),N_('failures.a_wind_farm_service_vessel_dropped')]):!l.sub&&(CITY[l.a].ca||CITY[l.b].ca)&&Math.random()<0.4?pick([N_('failures.a_beaver_chewed_through_your_a'),N_('failures.your_a_b_fiber_is_down'),N_('failures.frost_heave_cracked_the_duct_on')]):!l.sub&&andesPair(l.a,l.b)?pick([N_('failures.a_landslide_in_the_andes_buried'),N_('failures.snow_closed_the_mountain_pass_and'),N_('failures.an_earthquake_shook_your_a_b'),N_('failures.a_llama_herd_trampled_the_fiber')]):!l.sub&&(CITY[l.a].india||CITY[l.b].india)?pick([N_('failures.road_widening_near_a_cut_your'),N_('failures.the_monsoon_flooded_a_manhole_on'),N_('failures.a_digger_found_your_a_b')]):l.sub?pick([N_('failures.a_curious_shark_bit_your_subsea'),N_('failures.a_ship_dragged_its_anchor_across'),N_('failures.an_undersea_landslide_snapped_a_b')]):pick([N_('failures.a_backhoe_found_your_fiber_between'),N_('failures.squirrels_chewed_through_a_b_they'),N_('failures.road_works_cut_a_b_nobody')]);
const en=wetCut(l)?N_('failures.the_wet_season_washed_out_the'):l.sub&&(CITY[l.a].au||CITY[l.b].au)&&!(l.cable&&CAB[l.cable].fragile)&&Math.random()<0.35?pick([N_('failures.box_jellyfish_season_at_the_a'),N_('failures.a_great_white_took_an_interest')]):l.cable&&CAB[l.cable].fragile&&Math.random()<0.8?pick([N_('failures.your_a_b_cable_is_cut'),N_('failures.a_b_is_down_same_cable')]):!l.sub&&CITY[l.a].land==='nzs'&&CITY[l.b].land==='nzs'&&Math.random()<0.75?pick([N_('failures.a_kea_pulled_the_rubber_seals'),N_('failures.the_sandflies_drove_your_splicing'),N_('failures.a_farmer_s_post_hole_digger')]):l.cable==='cook'&&Math.random()<0.6?N_('failures.a_ferry_dropped_anchor_in_cook'):!l.sub&&au&&Math.random()<0.75?pick([N_('failures.a_sulphur_crested_cockatoo_chewed'),N_('failures.a_kangaroo_hit_the_fiber_hut'),N_('failures.thieves_dug_up_your_a_b'),N_('failures.a_kilometre_of_copper_went_missing'),N_('failures.a_backhoe_putting_in_a_new'),N_('failures.the_emus_won_again_a_mob'),N_('failures.a_kangaroo_boxed_your_field_tech'),N_('failures.a_drop_bear_fell_on_the'),N_('failures.an_eastern_brown_snake_moved_into'),...((S.day%365)/30.42>=8&&(S.day%365)/30.42<11?[N_('failures.magpie_swooping_season_the_field')]:[]),...(auSummer?[N_('failures.bushfire_season_the_fiber_along_a')]:[]),...(nullPair(l.a,l.b)?[N_('failures.your_a_b_fiber_broke_somewhere')]:[])]):l.sub&&(l.a==='bda'||l.b==='bda')&&Math.random()<0.7?pick([N_('failures.your_a_b_cable_went_quiet'),N_('failures.the_repair_ship_s_compass_spun')]):l.sub&&(l.a==='tbu'||l.b==='tbu')&&Math.random()<0.7?pick([N_('failures.an_undersea_volcano_erupted_next_to'),N_('failures.the_seabed_off_tonga_slid_down')]):vn(l)&&Math.random()<0.8?pick([N_('failures.another_of_vietnam_s_subsea_cables'),N_('failures.your_a_b_cable_broke_in')]):!l.sub&&(l.a==='drw'||l.b==='drw')&&Math.random()<0.7?pick([N_('failures.a_crocodile_took_a_bite_out'),N_('failures.termites_ate_the_duct_on_a')]):tw(l)&&Math.random()<0.8?pick([N_('failures.a_cargo_ship_forgot_to_raise'),N_('failures.another_anchor_another_cut_your_a'),N_('failures.a_fishing_boat_with_an_unusually')]):l.sub&&(l.a==='oos'||l.b==='oos')&&Math.random()<0.8?pick([N_('failures.a_trawler_off_ostend_dragged_its'),N_('failures.a_wind_farm_service_vessel_dropped')]):!l.sub&&(CITY[l.a].ca||CITY[l.b].ca)&&Math.random()<0.4?pick([N_('failures.a_beaver_chewed_through_your_a'),N_('failures.your_a_b_fiber_is_down'),N_('failures.frost_heave_cracked_the_duct_on')]):!l.sub&&andesPair(l.a,l.b)?pick([N_('failures.a_landslide_in_the_andes_buried'),N_('failures.snow_closed_the_mountain_pass_and'),N_('failures.an_earthquake_shook_your_a_b'),N_('failures.a_llama_herd_trampled_the_fiber')]):!l.sub&&(CITY[l.a].india||CITY[l.b].india)?pick([N_('failures.road_widening_near_a_cut_your'),N_('failures.the_monsoon_flooded_a_manhole_on'),N_('failures.a_digger_found_your_a_b')]):l.sub?pick([N_('failures.a_curious_shark_bit_your_subsea'),N_('failures.a_ship_dragged_its_anchor_across'),N_('failures.an_undersea_landslide_snapped_a_b')]):pick([N_('failures.a_backhoe_found_your_fiber_between'),N_('failures.squirrels_chewed_through_a_b_they'),N_('failures.road_works_cut_a_b_nobody')]);
addInc({type,ref:trc,until:S.day+dur,msg:tr(en,{a:A,b:B})+(hit.length>1?' '+tr('failures.all_n_links_in_that_trench',{n:hit.length}):''),cost:Math.max(4000,Math.round(hit.reduce((a,x)=>a+x.mo,0)*0.5))},en);
// At sea a cable ship sails out to it (50-cable-ships.js): it sets how long the cut lasts and what a charter costs.
// Without ships (Best Effort) a sea cut mends on the same clock as one on land.