├── clash.yaml ├── dm.js ├── index.js └── xx.css /dm.js: -------------------------------------------------------------------------------- 1 | // version base on commit 43fad05dcdae3b723c53c226f8181fc5bd47223e, time is 2023-06-22 15:20:02 UTC. 2 | // @ts-ignore 3 | import { connect } from 'cloudflare:sockets'; 4 | 5 | // How to generate your own UUID: 6 | // [Windows] Press "Win + R", input cmd and run: Powershell -NoExit -Command "[guid]::NewGuid()" 7 | let userID = 'd342d11e-d424-4583-b36e-524ab1f0afa4'; 8 | 9 | const proxyIPs = ['cdn-all.xn--b6gac.eu.org', 'cdn.xn--b6gac.eu.org', 'cdn-b100.xn--b6gac.eu.org', 'edgetunnel.anycast.eu.org', 'cdn.anycast.eu.org']; 10 | let proxyIP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)]; 11 | 12 | let dohURL = 'https://sky.rethinkdns.com/1:-Pf_____9_8A_AMAIgE8kMABVDDmKOHTAKg='; // https://cloudflare-dns.com/dns-query or https://dns.google/dns-query 13 | 14 | // v2board api environment variables 15 | let nodeId = ''; // 1 16 | 17 | let apiToken = ''; //abcdefghijklmnopqrstuvwxyz123456 18 | 19 | let apiHost = ''; // api.v2board.com 20 | 21 | if (!isValidUUID(userID)) { 22 | throw new Error('uuid is not valid'); 23 | } 24 | 25 | export default { 26 | /** 27 | * @param {import("@cloudflare/workers-types").Request} request 28 | * @param {{UUID: string, PROXYIP: string, DNS_RESOLVER_URL: string, NODE_ID: int, API_HOST: string, API_TOKEN: string}} env 29 | * @param {import("@cloudflare/workers-types").ExecutionContext} ctx 30 | * @returns {Promise} 31 | */ 32 | async fetch(request, env, ctx) { 33 | try { 34 | userID = env.UUID || userID; 35 | proxyIP = env.PROXYIP || proxyIP; 36 | dohURL = env.DNS_RESOLVER_URL || dohURL; 37 | nodeId = env.NODE_ID || nodeId; 38 | apiToken = env.API_TOKEN || apiToken; 39 | apiHost = env.API_HOST || apiHost; 40 | const upgradeHeader = request.headers.get('Upgrade'); 41 | if (!upgradeHeader || upgradeHeader !== 'websocket') { 42 | const url = new URL(request.url); 43 | switch (url.pathname) { 44 | case '/cf': 45 | return new Response(JSON.stringify(request.cf, null, 4), { 46 | status: 200, 47 | headers: { 48 | "Content-Type": "application/json;charset=utf-8", 49 | }, 50 | }); 51 | case '/connect': // for test connect to cf socket 52 | const [hostname, port] = ['cloudflare.com', '80']; 53 | console.log(`Connecting to ${hostname}:${port}...`); 54 | 55 | try { 56 | const socket = await connect({ 57 | hostname: hostname, 58 | port: parseInt(port, 10), 59 | }); 60 | 61 | const writer = socket.writable.getWriter(); 62 | 63 | try { 64 | await writer.write(new TextEncoder().encode('GET / HTTP/1.1\r\nHost: ' + hostname + '\r\n\r\n')); 65 | } catch (writeError) { 66 | writer.releaseLock(); 67 | await socket.close(); 68 | return new Response(writeError.message, { status: 500 }); 69 | } 70 | 71 | writer.releaseLock(); 72 | 73 | const reader = socket.readable.getReader(); 74 | let value; 75 | 76 | try { 77 | const result = await reader.read(); 78 | value = result.value; 79 | } catch (readError) { 80 | await reader.releaseLock(); 81 | await socket.close(); 82 | return new Response(readError.message, { status: 500 }); 83 | } 84 | 85 | await reader.releaseLock(); 86 | await socket.close(); 87 | 88 | return new Response(new TextDecoder().decode(value), { status: 200 }); 89 | } catch (connectError) { 90 | return new Response(connectError.message, { status: 500 }); 91 | } 92 | case `/${userID}`: { 93 | const vlessConfig = getVLESSConfig(userID, request.headers.get('Host')); 94 | return new Response(`${vlessConfig}`, { 95 | status: 200, 96 | headers: { 97 | "Content-Type": "text/plain;charset=utf-8", 98 | } 99 | }); 100 | } 101 | default: 102 | // return new Response('Not found', { status: 404 }); 103 | // For any other path, reverse proxy to 'www.fmprc.gov.cn' and return the original response 104 | url.hostname = Math.random() < 0.5 ? 'www.bilibili.com' : 'www.china.com.cn'; 105 | url.protocol = 'https:'; 106 | request = new Request(url, request); 107 | return await fetch(request); 108 | } 109 | } else { 110 | return await vlessOverWSHandler(request); 111 | } 112 | } catch (err) { 113 | /** @type {Error} */ let e = err; 114 | return new Response(e.toString()); 115 | } 116 | }, 117 | }; 118 | 119 | 120 | 121 | 122 | /** 123 | * 124 | * @param {import("@cloudflare/workers-types").Request} request 125 | */ 126 | async function vlessOverWSHandler(request) { 127 | 128 | /** @type {import("@cloudflare/workers-types").WebSocket[]} */ 129 | // @ts-ignore 130 | const webSocketPair = new WebSocketPair(); 131 | const [client, webSocket] = Object.values(webSocketPair); 132 | 133 | webSocket.accept(); 134 | 135 | let address = ''; 136 | let portWithRandomLog = ''; 137 | const log = (/** @type {string} */ info, /** @type {string | undefined} */ event) => { 138 | console.log(`[${address}:${portWithRandomLog}] ${info}`, event || ''); 139 | }; 140 | const earlyDataHeader = request.headers.get('sec-websocket-protocol') || ''; 141 | 142 | const readableWebSocketStream = makeReadableWebSocketStream(webSocket, earlyDataHeader, log); 143 | 144 | /** @type {{ value: import("@cloudflare/workers-types").Socket | null}}*/ 145 | let remoteSocketWapper = { 146 | value: null, 147 | }; 148 | let udpStreamWrite = null; 149 | let isDns = false; 150 | 151 | // ws --> remote 152 | readableWebSocketStream.pipeTo(new WritableStream({ 153 | async write(chunk, controller) { 154 | if (isDns && udpStreamWrite) { 155 | return udpStreamWrite(chunk); 156 | } 157 | if (remoteSocketWapper.value) { 158 | const writer = remoteSocketWapper.value.writable.getWriter() 159 | await writer.write(chunk); 160 | writer.releaseLock(); 161 | return; 162 | } 163 | 164 | const { 165 | hasError, 166 | message, 167 | portRemote = 443, 168 | addressRemote = '', 169 | rawDataIndex, 170 | vlessVersion = new Uint8Array([0, 0]), 171 | isUDP, 172 | } = await processVlessHeader(chunk, userID); 173 | address = addressRemote; 174 | portWithRandomLog = `${portRemote}--${Math.random()} ${isUDP ? 'udp ' : 'tcp ' 175 | } `; 176 | if (hasError) { 177 | // controller.error(message); 178 | throw new Error(message); // cf seems has bug, controller.error will not end stream 179 | // webSocket.close(1000, message); 180 | return; 181 | } 182 | // if UDP but port not DNS port, close it 183 | if (isUDP) { 184 | if (portRemote === 53) { 185 | isDns = true; 186 | } else { 187 | // controller.error('UDP proxy only enable for DNS which is port 53'); 188 | throw new Error('UDP proxy only enable for DNS which is port 53'); // cf seems has bug, controller.error will not end stream 189 | return; 190 | } 191 | } 192 | // ["version", "附加信息长度 N"] 193 | const vlessResponseHeader = new Uint8Array([vlessVersion[0], 0]); 194 | const rawClientData = chunk.slice(rawDataIndex); 195 | 196 | // TODO: support udp here when cf runtime has udp support 197 | if (isDns) { 198 | const { write } = await handleUDPOutBound(webSocket, vlessResponseHeader, log); 199 | udpStreamWrite = write; 200 | udpStreamWrite(rawClientData); 201 | return; 202 | } 203 | handleTCPOutBound(remoteSocketWapper, addressRemote, portRemote, rawClientData, webSocket, vlessResponseHeader, log); 204 | }, 205 | close() { 206 | log(`readableWebSocketStream is close`); 207 | }, 208 | abort(reason) { 209 | log(`readableWebSocketStream is abort`, JSON.stringify(reason)); 210 | }, 211 | })).catch((err) => { 212 | log('readableWebSocketStream pipeTo error', err); 213 | }); 214 | 215 | return new Response(null, { 216 | status: 101, 217 | // @ts-ignore 218 | webSocket: client, 219 | }); 220 | } 221 | 222 | let apiResponseCache = null; 223 | let cacheTimeout = null; 224 | 225 | /** 226 | * Fetches the API response from the server and caches it for future use. 227 | * @returns {Promise} A Promise that resolves to the API response object or null if there was an error. 228 | */ 229 | async function fetchApiResponse() { 230 | const requestOptions = { 231 | method: 'GET', 232 | redirect: 'follow' 233 | }; 234 | 235 | try { 236 | const response = await fetch(`https://${apiHost}/api/v1/server/UniProxy/user?node_id=${nodeId}&node_type=v2ray&token=${apiToken}`, requestOptions); 237 | 238 | if (!response.ok) { 239 | console.error('Error: Network response was not ok'); 240 | return null; 241 | } 242 | const apiResponse = await response.json(); 243 | apiResponseCache = apiResponse; 244 | 245 | // Refresh the cache every 5 minutes (300000 milliseconds) 246 | if (cacheTimeout) { 247 | clearTimeout(cacheTimeout); 248 | } 249 | cacheTimeout = setTimeout(() => fetchApiResponse(), 300000); 250 | 251 | return apiResponse; 252 | } catch (error) { 253 | console.error('Error:', error); 254 | return null; 255 | } 256 | } 257 | 258 | /** 259 | * Returns the cached API response if it exists, otherwise fetches the API response from the server and caches it for future use. 260 | * @returns {Promise} A Promise that resolves to the cached API response object or the fetched API response object, or null if there was an error. 261 | */ 262 | async function getApiResponse() { 263 | if (!apiResponseCache) { 264 | return await fetchApiResponse(); 265 | } 266 | return apiResponseCache; 267 | } 268 | 269 | /** 270 | * Checks if a given UUID is present in the API response. 271 | * @param {string} targetUuid The UUID to search for. 272 | * @returns {Promise} A Promise that resolves to true if the UUID is present in the API response, false otherwise. 273 | */ 274 | async function checkUuidInApiResponse(targetUuid) { 275 | // Check if any of the environment variables are empty 276 | if (!nodeId || !apiToken || !apiHost) { 277 | return false; 278 | } 279 | 280 | try { 281 | const apiResponse = await getApiResponse(); 282 | if (!apiResponse) { 283 | return false; 284 | } 285 | const isUuidInResponse = apiResponse.users.some(user => user.uuid === targetUuid); 286 | return isUuidInResponse; 287 | } catch (error) { 288 | console.error('Error:', error); 289 | return false; 290 | } 291 | } 292 | 293 | // Usage example: 294 | // const targetUuid = "65590e04-a94c-4c59-a1f2-571bce925aad"; 295 | // checkUuidInApiResponse(targetUuid).then(result => console.log(result)); 296 | 297 | /** 298 | * Handles outbound TCP connections. 299 | * 300 | * @param {any} remoteSocket 301 | * @param {string} addressRemote The remote address to connect to. 302 | * @param {number} portRemote The remote port to connect to. 303 | * @param {Uint8Array} rawClientData The raw client data to write. 304 | * @param {import("@cloudflare/workers-types").WebSocket} webSocket The WebSocket to pass the remote socket to. 305 | * @param {Uint8Array} vlessResponseHeader The VLESS response header. 306 | * @param {function} log The logging function. 307 | * @returns {Promise} The remote socket. 308 | */ 309 | async function handleTCPOutBound(remoteSocket, addressRemote, portRemote, rawClientData, webSocket, vlessResponseHeader, log,) { 310 | async function connectAndWrite(address, port) { 311 | /** @type {import("@cloudflare/workers-types").Socket} */ 312 | const tcpSocket = connect({ 313 | hostname: address, 314 | port: port, 315 | }); 316 | remoteSocket.value = tcpSocket; 317 | log(`connected to ${address}:${port}`); 318 | const writer = tcpSocket.writable.getWriter(); 319 | await writer.write(rawClientData); // first write, nomal is tls client hello 320 | writer.releaseLock(); 321 | return tcpSocket; 322 | } 323 | 324 | // if the cf connect tcp socket have no incoming data, we retry to redirect ip 325 | async function retry() { 326 | const tcpSocket = await connectAndWrite(proxyIP || addressRemote, portRemote) 327 | // no matter retry success or not, close websocket 328 | tcpSocket.closed.catch(error => { 329 | console.log('retry tcpSocket closed error', error); 330 | }).finally(() => { 331 | safeCloseWebSocket(webSocket); 332 | }) 333 | remoteSocketToWS(tcpSocket, webSocket, vlessResponseHeader, null, log); 334 | } 335 | 336 | const tcpSocket = await connectAndWrite(addressRemote, portRemote); 337 | 338 | // when remoteSocket is ready, pass to websocket 339 | // remote--> ws 340 | remoteSocketToWS(tcpSocket, webSocket, vlessResponseHeader, retry, log); 341 | } 342 | 343 | /** 344 | * 345 | * @param {import("@cloudflare/workers-types").WebSocket} webSocketServer 346 | * @param {string} earlyDataHeader for ws 0rtt 347 | * @param {(info: string)=> void} log for ws 0rtt 348 | */ 349 | function makeReadableWebSocketStream(webSocketServer, earlyDataHeader, log) { 350 | let readableStreamCancel = false; 351 | const stream = new ReadableStream({ 352 | start(controller) { 353 | webSocketServer.addEventListener('message', (event) => { 354 | if (readableStreamCancel) { 355 | return; 356 | } 357 | const message = event.data; 358 | controller.enqueue(message); 359 | }); 360 | 361 | // The event means that the client closed the client -> server stream. 362 | // However, the server -> client stream is still open until you call close() on the server side. 363 | // The WebSocket protocol says that a separate close message must be sent in each direction to fully close the socket. 364 | webSocketServer.addEventListener('close', () => { 365 | // client send close, need close server 366 | // if stream is cancel, skip controller.close 367 | safeCloseWebSocket(webSocketServer); 368 | if (readableStreamCancel) { 369 | return; 370 | } 371 | controller.close(); 372 | } 373 | ); 374 | webSocketServer.addEventListener('error', (err) => { 375 | log('webSocketServer has error'); 376 | controller.error(err); 377 | } 378 | ); 379 | // for ws 0rtt 380 | const { earlyData, error } = base64ToArrayBuffer(earlyDataHeader); 381 | if (error) { 382 | controller.error(error); 383 | } else if (earlyData) { 384 | controller.enqueue(earlyData); 385 | } 386 | }, 387 | 388 | pull(controller) { 389 | // if ws can stop read if stream is full, we can implement backpressure 390 | // https://streams.spec.whatwg.org/#example-rs-push-backpressure 391 | }, 392 | cancel(reason) { 393 | // 1. pipe WritableStream has error, this cancel will called, so ws handle server close into here 394 | // 2. if readableStream is cancel, all controller.close/enqueue need skip, 395 | // 3. but from testing controller.error still work even if readableStream is cancel 396 | if (readableStreamCancel) { 397 | return; 398 | } 399 | log(`ReadableStream was canceled, due to ${reason}`) 400 | readableStreamCancel = true; 401 | safeCloseWebSocket(webSocketServer); 402 | } 403 | }); 404 | 405 | return stream; 406 | 407 | } 408 | 409 | // https://xtls.github.io/development/protocols/vless.html 410 | // https://github.com/zizifn/excalidraw-backup/blob/main/v2ray-protocol.excalidraw 411 | 412 | /** 413 | * 414 | * @param { ArrayBuffer} vlessBuffer 415 | * @param {string} userID 416 | * @returns 417 | */ 418 | async function processVlessHeader( 419 | vlessBuffer, 420 | userID 421 | ) { 422 | if (vlessBuffer.byteLength < 24) { 423 | return { 424 | hasError: true, 425 | message: 'invalid data', 426 | }; 427 | } 428 | const version = new Uint8Array(vlessBuffer.slice(0, 1)); 429 | let isValidUser = false; 430 | let isUDP = false; 431 | const slicedBuffer = new Uint8Array(vlessBuffer.slice(1, 17)); 432 | const slicedBufferString = stringify(slicedBuffer); 433 | 434 | const uuids = userID.includes(',') ? userID.split(",") : [userID]; 435 | 436 | const checkUuidInApi = await checkUuidInApiResponse(slicedBufferString); 437 | isValidUser = uuids.some(userUuid => checkUuidInApi || slicedBufferString === userUuid.trim()); 438 | 439 | console.log(`checkUuidInApi: ${await checkUuidInApiResponse(slicedBufferString)}, userID: ${slicedBufferString}`); 440 | 441 | if (!isValidUser) { 442 | return { 443 | hasError: true, 444 | message: 'invalid user', 445 | }; 446 | } 447 | 448 | const optLength = new Uint8Array(vlessBuffer.slice(17, 18))[0]; 449 | //skip opt for now 450 | 451 | const command = new Uint8Array( 452 | vlessBuffer.slice(18 + optLength, 18 + optLength + 1) 453 | )[0]; 454 | 455 | // 0x01 TCP 456 | // 0x02 UDP 457 | // 0x03 MUX 458 | if (command === 1) { 459 | } else if (command === 2) { 460 | isUDP = true; 461 | } else { 462 | return { 463 | hasError: true, 464 | message: `command ${command} is not support, command 01-tcp,02-udp,03-mux`, 465 | }; 466 | } 467 | const portIndex = 18 + optLength + 1; 468 | const portBuffer = vlessBuffer.slice(portIndex, portIndex + 2); 469 | // port is big-Endian in raw data etc 80 == 0x005d 470 | const portRemote = new DataView(portBuffer).getUint16(0); 471 | 472 | let addressIndex = portIndex + 2; 473 | const addressBuffer = new Uint8Array( 474 | vlessBuffer.slice(addressIndex, addressIndex + 1) 475 | ); 476 | 477 | // 1--> ipv4 addressLength =4 478 | // 2--> domain name addressLength=addressBuffer[1] 479 | // 3--> ipv6 addressLength =16 480 | const addressType = addressBuffer[0]; 481 | let addressLength = 0; 482 | let addressValueIndex = addressIndex + 1; 483 | let addressValue = ''; 484 | switch (addressType) { 485 | case 1: 486 | addressLength = 4; 487 | addressValue = new Uint8Array( 488 | vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength) 489 | ).join('.'); 490 | break; 491 | case 2: 492 | addressLength = new Uint8Array( 493 | vlessBuffer.slice(addressValueIndex, addressValueIndex + 1) 494 | )[0]; 495 | addressValueIndex += 1; 496 | addressValue = new TextDecoder().decode( 497 | vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength) 498 | ); 499 | break; 500 | case 3: 501 | addressLength = 16; 502 | const dataView = new DataView( 503 | vlessBuffer.slice(addressValueIndex, addressValueIndex + addressLength) 504 | ); 505 | // 2001:0db8:85a3:0000:0000:8a2e:0370:7334 506 | const ipv6 = []; 507 | for (let i = 0; i < 8; i++) { 508 | ipv6.push(dataView.getUint16(i * 2).toString(16)); 509 | } 510 | addressValue = ipv6.join(':'); 511 | // seems no need add [] for ipv6 512 | break; 513 | default: 514 | return { 515 | hasError: true, 516 | message: `invild addressType is ${addressType}`, 517 | }; 518 | } 519 | if (!addressValue) { 520 | return { 521 | hasError: true, 522 | message: `addressValue is empty, addressType is ${addressType}`, 523 | }; 524 | } 525 | 526 | return { 527 | hasError: false, 528 | addressRemote: addressValue, 529 | addressType, 530 | portRemote, 531 | rawDataIndex: addressValueIndex + addressLength, 532 | vlessVersion: version, 533 | isUDP, 534 | }; 535 | } 536 | 537 | 538 | /** 539 | * 540 | * @param {import("@cloudflare/workers-types").Socket} remoteSocket 541 | * @param {import("@cloudflare/workers-types").WebSocket} webSocket 542 | * @param {ArrayBuffer} vlessResponseHeader 543 | * @param {(() => Promise) | null} retry 544 | * @param {*} log 545 | */ 546 | async function remoteSocketToWS(remoteSocket, webSocket, vlessResponseHeader, retry, log) { 547 | // remote--> ws 548 | let remoteChunkCount = 0; 549 | let chunks = []; 550 | /** @type {ArrayBuffer | null} */ 551 | let vlessHeader = vlessResponseHeader; 552 | let hasIncomingData = false; // check if remoteSocket has incoming data 553 | await remoteSocket.readable 554 | .pipeTo( 555 | new WritableStream({ 556 | start() { 557 | }, 558 | /** 559 | * 560 | * @param {Uint8Array} chunk 561 | * @param {*} controller 562 | */ 563 | async write(chunk, controller) { 564 | hasIncomingData = true; 565 | // remoteChunkCount++; 566 | if (webSocket.readyState !== WS_READY_STATE_OPEN) { 567 | controller.error( 568 | 'webSocket.readyState is not open, maybe close' 569 | ); 570 | } 571 | if (vlessHeader) { 572 | webSocket.send(await new Blob([vlessHeader, chunk]).arrayBuffer()); 573 | vlessHeader = null; 574 | } else { 575 | // seems no need rate limit this, CF seems fix this??.. 576 | // if (remoteChunkCount > 20000) { 577 | // // cf one package is 4096 byte(4kb), 4096 * 20000 = 80M 578 | // await delay(1); 579 | // } 580 | webSocket.send(chunk); 581 | } 582 | }, 583 | close() { 584 | log(`remoteConnection!.readable is close with hasIncomingData is ${hasIncomingData}`); 585 | // safeCloseWebSocket(webSocket); // no need server close websocket frist for some case will casue HTTP ERR_CONTENT_LENGTH_MISMATCH issue, client will send close event anyway. 586 | }, 587 | abort(reason) { 588 | console.error(`remoteConnection!.readable abort`, reason); 589 | }, 590 | }) 591 | ) 592 | .catch((error) => { 593 | console.error( 594 | `remoteSocketToWS has exception `, 595 | error.stack || error 596 | ); 597 | safeCloseWebSocket(webSocket); 598 | }); 599 | 600 | // seems is cf connect socket have error, 601 | // 1. Socket.closed will have error 602 | // 2. Socket.readable will be close without any data coming 603 | if (hasIncomingData === false && retry) { 604 | log(`retry`) 605 | retry(); 606 | } 607 | } 608 | 609 | /** 610 | * 611 | * @param {string} base64Str 612 | * @returns 613 | */ 614 | function base64ToArrayBuffer(base64Str) { 615 | if (!base64Str) { 616 | return { error: null }; 617 | } 618 | try { 619 | // go use modified Base64 for URL rfc4648 which js atob not support 620 | base64Str = base64Str.replace(/-/g, '+').replace(/_/g, '/'); 621 | const decode = atob(base64Str); 622 | const arryBuffer = Uint8Array.from(decode, (c) => c.charCodeAt(0)); 623 | return { earlyData: arryBuffer.buffer, error: null }; 624 | } catch (error) { 625 | return { error }; 626 | } 627 | } 628 | 629 | /** 630 | * This is not real UUID validation 631 | * @param {string} uuid 632 | */ 633 | function isValidUUID(uuid) { 634 | const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; 635 | return uuidRegex.test(uuid); 636 | } 637 | 638 | const WS_READY_STATE_OPEN = 1; 639 | const WS_READY_STATE_CLOSING = 2; 640 | /** 641 | * Normally, WebSocket will not has exceptions when close. 642 | * @param {import("@cloudflare/workers-types").WebSocket} socket 643 | */ 644 | function safeCloseWebSocket(socket) { 645 | try { 646 | if (socket.readyState === WS_READY_STATE_OPEN || socket.readyState === WS_READY_STATE_CLOSING) { 647 | socket.close(); 648 | } 649 | } catch (error) { 650 | console.error('safeCloseWebSocket error', error); 651 | } 652 | } 653 | 654 | const byteToHex = []; 655 | for (let i = 0; i < 256; ++i) { 656 | byteToHex.push((i + 256).toString(16).slice(1)); 657 | } 658 | function unsafeStringify(arr, offset = 0) { 659 | return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); 660 | } 661 | function stringify(arr, offset = 0) { 662 | const uuid = unsafeStringify(arr, offset); 663 | if (!isValidUUID(uuid)) { 664 | throw TypeError("Stringified UUID is invalid"); 665 | } 666 | return uuid; 667 | } 668 | 669 | 670 | /** 671 | * 672 | * @param {import("@cloudflare/workers-types").WebSocket} webSocket 673 | * @param {ArrayBuffer} vlessResponseHeader 674 | * @param {(string)=> void} log 675 | */ 676 | async function handleUDPOutBound(webSocket, vlessResponseHeader, log) { 677 | 678 | let isVlessHeaderSent = false; 679 | const transformStream = new TransformStream({ 680 | start(controller) { 681 | 682 | }, 683 | transform(chunk, controller) { 684 | // udp message 2 byte is the the length of udp data 685 | // TODO: this should have bug, beacsue maybe udp chunk can be in two websocket message 686 | for (let index = 0; index < chunk.byteLength;) { 687 | const lengthBuffer = chunk.slice(index, index + 2); 688 | const udpPakcetLength = new DataView(lengthBuffer).getUint16(0); 689 | const udpData = new Uint8Array( 690 | chunk.slice(index + 2, index + 2 + udpPakcetLength) 691 | ); 692 | index = index + 2 + udpPakcetLength; 693 | controller.enqueue(udpData); 694 | } 695 | }, 696 | flush(controller) { 697 | } 698 | }); 699 | 700 | // only handle dns udp for now 701 | transformStream.readable.pipeTo(new WritableStream({ 702 | async write(chunk) { 703 | const resp = await fetch(dohURL, // dns server url 704 | { 705 | method: 'POST', 706 | headers: { 707 | 'content-type': 'application/dns-message', 708 | }, 709 | body: chunk, 710 | }) 711 | const dnsQueryResult = await resp.arrayBuffer(); 712 | const udpSize = dnsQueryResult.byteLength; 713 | // console.log([...new Uint8Array(dnsQueryResult)].map((x) => x.toString(16))); 714 | const udpSizeBuffer = new Uint8Array([(udpSize >> 8) & 0xff, udpSize & 0xff]); 715 | if (webSocket.readyState === WS_READY_STATE_OPEN) { 716 | log(`doh success and dns message length is ${udpSize}`); 717 | if (isVlessHeaderSent) { 718 | webSocket.send(await new Blob([udpSizeBuffer, dnsQueryResult]).arrayBuffer()); 719 | } else { 720 | webSocket.send(await new Blob([vlessResponseHeader, udpSizeBuffer, dnsQueryResult]).arrayBuffer()); 721 | isVlessHeaderSent = true; 722 | } 723 | } 724 | } 725 | })).catch((error) => { 726 | log('dns udp has error' + error) 727 | }); 728 | 729 | const writer = transformStream.writable.getWriter(); 730 | 731 | return { 732 | /** 733 | * 734 | * @param {Uint8Array} chunk 735 | */ 736 | write(chunk) { 737 | writer.write(chunk); 738 | } 739 | }; 740 | } 741 | 742 | /** 743 | * 744 | * @param {string} userID 745 | * @param {string | null} hostName 746 | * @returns {string} 747 | */ 748 | function getVLESSConfig(userID, hostName) { 749 | const vlessMain = `vless://${userID}@${hostName}:443?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}` 750 | const vlessSec = `vless://${userID}@${proxyIP}:443?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2048#${hostName}` 751 | return ` 752 | ################################################################ 753 | v2ray default ip 754 | --------------------------------------------------------------- 755 | ${vlessMain} 756 | --------------------------------------------------------------- 757 | ################################################################ 758 | v2ray with best ip 759 | --------------------------------------------------------------- 760 | ${vlessSec} 761 | --------------------------------------------------------------- 762 | ################################################################ 763 | clash-meta 764 | --------------------------------------------------------------- 765 | - type: vless 766 | name: ${hostName} 767 | server: ${hostName} 768 | port: 443 769 | uuid: ${userID} 770 | network: ws 771 | tls: true 772 | udp: false 773 | sni: ${hostName} 774 | client-fingerprint: chrome 775 | ws-opts: 776 | path: "/?ed=2048" 777 | headers: 778 | host: ${hostName} 779 | --------------------------------------------------------------- 780 | ################################################################ 781 | `; 782 | } 783 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * v2ray Subscription Worker v1.6 3 | * Copyright 2023 Vahid Farid (https://twitter.com/vahidfarid) 4 | * Licensed under GPLv3 (https://github.com/vfarid/v2ray-worker-sub/blob/main/Licence.md) 5 | */ 6 | 7 | var MAX_CONFIGS = 1000; 8 | var INCLUDE_ORIGINAL = true; 9 | var configProviders = [ 10 | { 11 | name: "vpei", 12 | type: "b64", 13 | urls: [ 14 | "https://raw.githubusercontent.com/vpei/Free-Node-Merge/main/o/node.txt" 15 | ] 16 | }, 17 | { 18 | name: "mfuu", 19 | type: "b64", 20 | urls: [ 21 | "https://raw.githubusercontent.com/mfuu/v2ray/master/v2ray" 22 | ] 23 | }, 24 | { 25 | name: "peasoft", 26 | type: "raw", 27 | urls: [ 28 | "https://raw.githubusercontent.com/peasoft/NoMoreWalls/master/list_raw.txt" 29 | ] 30 | }, 31 | { 32 | name: "ermaozi", 33 | type: "b64", 34 | urls: [ 35 | "https://raw.githubusercontent.com/ermaozi/get_subscribe/main/subscribe/v2ray.txt" 36 | ] 37 | }, 38 | { 39 | name: "aiboboxx", 40 | type: "b64", 41 | urls: [ 42 | "https://raw.githubusercontent.com/aiboboxx/v2rayfree/main/v2" 43 | ] 44 | }, 45 | { 46 | name: "mahdibland", 47 | type: "raw", 48 | urls: [ 49 | "https://raw.githubusercontent.com/mahdibland/V2RayAggregator/master/sub/splitted/vmess.txt", 50 | "https://raw.githubusercontent.com/mahdibland/V2RayAggregator/master/sub/splitted/trojan.txt" 51 | ] 52 | }, 53 | { 54 | name: "bardiafa", 55 | type: "raw", 56 | urls: [ 57 | "https://raw.githubusercontent.com/Bardiafa/Free-V2ray-Config/main/All_Configs_Sub.txt" 58 | ] 59 | }, 60 | { 61 | name: "autoproxy", 62 | type: "b64", 63 | urls: [ 64 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription1", 65 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription2", 66 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription3", 67 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription4", 68 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription5", 69 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription6", 70 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription7", 71 | "https://raw.githubusercontent.com/w1770946466/Auto_proxy/main/Long_term_subscription8" 72 | ] 73 | }, 74 | { 75 | name: "freefq", 76 | type: "b64", 77 | urls: [ 78 | "https://raw.githubusercontent.com/freefq/free/master/v2" 79 | ] 80 | }, 81 | { 82 | name: "pawdroid", 83 | type: "b64", 84 | urls: [ 85 | "https://raw.githubusercontent.com/Pawdroid/Free-servers/main/sub" 86 | ] 87 | } 88 | ]; 89 | 90 | var __create = Object.create; 91 | var __defProp = Object.defineProperty; 92 | var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 93 | var __getOwnPropNames = Object.getOwnPropertyNames; 94 | var __getProtoOf = Object.getPrototypeOf; 95 | var __hasOwnProp = Object.prototype.hasOwnProperty; 96 | var __commonJS = (cb, mod) => function __require() { 97 | return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 98 | }; 99 | var __copyProps = (to, from, except, desc) => { 100 | if (from && typeof from === "object" || typeof from === "function") { 101 | for (let key of __getOwnPropNames(from)) 102 | if (!__hasOwnProp.call(to, key) && key !== except) 103 | __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 104 | } 105 | return to; 106 | }; 107 | var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 108 | isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 109 | mod 110 | )); 111 | 112 | // node_modules/base64-js/index.js 113 | var require_base64_js = __commonJS({ 114 | "node_modules/base64-js/index.js"(exports) { 115 | "use strict"; 116 | exports.byteLength = byteLength; 117 | exports.toByteArray = toByteArray; 118 | exports.fromByteArray = fromByteArray; 119 | var lookup = []; 120 | var revLookup = []; 121 | var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; 122 | var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 123 | for (i = 0, len = code.length; i < len; ++i) { 124 | lookup[i] = code[i]; 125 | revLookup[code.charCodeAt(i)] = i; 126 | } 127 | var i; 128 | var len; 129 | revLookup["-".charCodeAt(0)] = 62; 130 | revLookup["_".charCodeAt(0)] = 63; 131 | function getLens(b64) { 132 | var len2 = b64.length; 133 | if (len2 % 4 > 0) { 134 | throw new Error("Invalid string. Length must be a multiple of 4"); 135 | } 136 | var validLen = b64.indexOf("="); 137 | if (validLen === -1) 138 | validLen = len2; 139 | var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4; 140 | return [validLen, placeHoldersLen]; 141 | } 142 | function byteLength(b64) { 143 | var lens = getLens(b64); 144 | var validLen = lens[0]; 145 | var placeHoldersLen = lens[1]; 146 | return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; 147 | } 148 | function _byteLength(b64, validLen, placeHoldersLen) { 149 | return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; 150 | } 151 | function toByteArray(b64) { 152 | var tmp; 153 | var lens = getLens(b64); 154 | var validLen = lens[0]; 155 | var placeHoldersLen = lens[1]; 156 | var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); 157 | var curByte = 0; 158 | var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen; 159 | var i2; 160 | for (i2 = 0; i2 < len2; i2 += 4) { 161 | tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)]; 162 | arr[curByte++] = tmp >> 16 & 255; 163 | arr[curByte++] = tmp >> 8 & 255; 164 | arr[curByte++] = tmp & 255; 165 | } 166 | if (placeHoldersLen === 2) { 167 | tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4; 168 | arr[curByte++] = tmp & 255; 169 | } 170 | if (placeHoldersLen === 1) { 171 | tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2; 172 | arr[curByte++] = tmp >> 8 & 255; 173 | arr[curByte++] = tmp & 255; 174 | } 175 | return arr; 176 | } 177 | function tripletToBase64(num) { 178 | return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63]; 179 | } 180 | function encodeChunk(uint8, start, end) { 181 | var tmp; 182 | var output = []; 183 | for (var i2 = start; i2 < end; i2 += 3) { 184 | tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255); 185 | output.push(tripletToBase64(tmp)); 186 | } 187 | return output.join(""); 188 | } 189 | function fromByteArray(uint8) { 190 | var tmp; 191 | var len2 = uint8.length; 192 | var extraBytes = len2 % 3; 193 | var parts = []; 194 | var maxChunkLength = 16383; 195 | for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) { 196 | parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength)); 197 | } 198 | if (extraBytes === 1) { 199 | tmp = uint8[len2 - 1]; 200 | parts.push( 201 | lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==" 202 | ); 203 | } else if (extraBytes === 2) { 204 | tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; 205 | parts.push( 206 | lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=" 207 | ); 208 | } 209 | return parts.join(""); 210 | } 211 | } 212 | }); 213 | 214 | // node_modules/ieee754/index.js 215 | var require_ieee754 = __commonJS({ 216 | "node_modules/ieee754/index.js"(exports) { 217 | exports.read = function(buffer, offset, isLE, mLen, nBytes) { 218 | var e, m; 219 | var eLen = nBytes * 8 - mLen - 1; 220 | var eMax = (1 << eLen) - 1; 221 | var eBias = eMax >> 1; 222 | var nBits = -7; 223 | var i = isLE ? nBytes - 1 : 0; 224 | var d = isLE ? -1 : 1; 225 | var s = buffer[offset + i]; 226 | i += d; 227 | e = s & (1 << -nBits) - 1; 228 | s >>= -nBits; 229 | nBits += eLen; 230 | for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) { 231 | } 232 | m = e & (1 << -nBits) - 1; 233 | e >>= -nBits; 234 | nBits += mLen; 235 | for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) { 236 | } 237 | if (e === 0) { 238 | e = 1 - eBias; 239 | } else if (e === eMax) { 240 | return m ? NaN : (s ? -1 : 1) * Infinity; 241 | } else { 242 | m = m + Math.pow(2, mLen); 243 | e = e - eBias; 244 | } 245 | return (s ? -1 : 1) * m * Math.pow(2, e - mLen); 246 | }; 247 | exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { 248 | var e, m, c; 249 | var eLen = nBytes * 8 - mLen - 1; 250 | var eMax = (1 << eLen) - 1; 251 | var eBias = eMax >> 1; 252 | var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; 253 | var i = isLE ? 0 : nBytes - 1; 254 | var d = isLE ? 1 : -1; 255 | var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; 256 | value = Math.abs(value); 257 | if (isNaN(value) || value === Infinity) { 258 | m = isNaN(value) ? 1 : 0; 259 | e = eMax; 260 | } else { 261 | e = Math.floor(Math.log(value) / Math.LN2); 262 | if (value * (c = Math.pow(2, -e)) < 1) { 263 | e--; 264 | c *= 2; 265 | } 266 | if (e + eBias >= 1) { 267 | value += rt / c; 268 | } else { 269 | value += rt * Math.pow(2, 1 - eBias); 270 | } 271 | if (value * c >= 2) { 272 | e++; 273 | c /= 2; 274 | } 275 | if (e + eBias >= eMax) { 276 | m = 0; 277 | e = eMax; 278 | } else if (e + eBias >= 1) { 279 | m = (value * c - 1) * Math.pow(2, mLen); 280 | e = e + eBias; 281 | } else { 282 | m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); 283 | e = 0; 284 | } 285 | } 286 | for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) { 287 | } 288 | e = e << mLen | m; 289 | eLen += mLen; 290 | for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) { 291 | } 292 | buffer[offset + i - d] |= s * 128; 293 | }; 294 | } 295 | }); 296 | 297 | // node_modules/buffer/index.js 298 | var require_buffer = __commonJS({ 299 | "node_modules/buffer/index.js"(exports) { 300 | "use strict"; 301 | var base64 = require_base64_js(); 302 | var ieee754 = require_ieee754(); 303 | var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null; 304 | exports.Buffer = Buffer3; 305 | exports.SlowBuffer = SlowBuffer; 306 | exports.INSPECT_MAX_BYTES = 50; 307 | var K_MAX_LENGTH = 2147483647; 308 | exports.kMaxLength = K_MAX_LENGTH; 309 | Buffer3.TYPED_ARRAY_SUPPORT = typedArraySupport(); 310 | if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { 311 | console.error( 312 | "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support." 313 | ); 314 | } 315 | function typedArraySupport() { 316 | try { 317 | const arr = new Uint8Array(1); 318 | const proto = { foo: function() { 319 | return 42; 320 | } }; 321 | Object.setPrototypeOf(proto, Uint8Array.prototype); 322 | Object.setPrototypeOf(arr, proto); 323 | return arr.foo() === 42; 324 | } catch (e) { 325 | return false; 326 | } 327 | } 328 | Object.defineProperty(Buffer3.prototype, "parent", { 329 | enumerable: true, 330 | get: function() { 331 | if (!Buffer3.isBuffer(this)) 332 | return void 0; 333 | return this.buffer; 334 | } 335 | }); 336 | Object.defineProperty(Buffer3.prototype, "offset", { 337 | enumerable: true, 338 | get: function() { 339 | if (!Buffer3.isBuffer(this)) 340 | return void 0; 341 | return this.byteOffset; 342 | } 343 | }); 344 | function createBuffer(length) { 345 | if (length > K_MAX_LENGTH) { 346 | throw new RangeError('The value "' + length + '" is invalid for option "size"'); 347 | } 348 | const buf = new Uint8Array(length); 349 | Object.setPrototypeOf(buf, Buffer3.prototype); 350 | return buf; 351 | } 352 | function Buffer3(arg, encodingOrOffset, length) { 353 | if (typeof arg === "number") { 354 | if (typeof encodingOrOffset === "string") { 355 | throw new TypeError( 356 | 'The "string" argument must be of type string. Received type number' 357 | ); 358 | } 359 | return allocUnsafe(arg); 360 | } 361 | return from(arg, encodingOrOffset, length); 362 | } 363 | Buffer3.poolSize = 8192; 364 | function from(value, encodingOrOffset, length) { 365 | if (typeof value === "string") { 366 | return fromString(value, encodingOrOffset); 367 | } 368 | if (ArrayBuffer.isView(value)) { 369 | return fromArrayView(value); 370 | } 371 | if (value == null) { 372 | throw new TypeError( 373 | "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value 374 | ); 375 | } 376 | if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) { 377 | return fromArrayBuffer(value, encodingOrOffset, length); 378 | } 379 | if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) { 380 | return fromArrayBuffer(value, encodingOrOffset, length); 381 | } 382 | if (typeof value === "number") { 383 | throw new TypeError( 384 | 'The "value" argument must not be of type number. Received type number' 385 | ); 386 | } 387 | const valueOf = value.valueOf && value.valueOf(); 388 | if (valueOf != null && valueOf !== value) { 389 | return Buffer3.from(valueOf, encodingOrOffset, length); 390 | } 391 | const b = fromObject(value); 392 | if (b) 393 | return b; 394 | if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") { 395 | return Buffer3.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length); 396 | } 397 | throw new TypeError( 398 | "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value 399 | ); 400 | } 401 | Buffer3.from = function(value, encodingOrOffset, length) { 402 | return from(value, encodingOrOffset, length); 403 | }; 404 | Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype); 405 | Object.setPrototypeOf(Buffer3, Uint8Array); 406 | function assertSize(size) { 407 | if (typeof size !== "number") { 408 | throw new TypeError('"size" argument must be of type number'); 409 | } else if (size < 0) { 410 | throw new RangeError('The value "' + size + '" is invalid for option "size"'); 411 | } 412 | } 413 | function alloc(size, fill, encoding) { 414 | assertSize(size); 415 | if (size <= 0) { 416 | return createBuffer(size); 417 | } 418 | if (fill !== void 0) { 419 | return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill); 420 | } 421 | return createBuffer(size); 422 | } 423 | Buffer3.alloc = function(size, fill, encoding) { 424 | return alloc(size, fill, encoding); 425 | }; 426 | function allocUnsafe(size) { 427 | assertSize(size); 428 | return createBuffer(size < 0 ? 0 : checked(size) | 0); 429 | } 430 | Buffer3.allocUnsafe = function(size) { 431 | return allocUnsafe(size); 432 | }; 433 | Buffer3.allocUnsafeSlow = function(size) { 434 | return allocUnsafe(size); 435 | }; 436 | function fromString(string, encoding) { 437 | if (typeof encoding !== "string" || encoding === "") { 438 | encoding = "utf8"; 439 | } 440 | if (!Buffer3.isEncoding(encoding)) { 441 | throw new TypeError("Unknown encoding: " + encoding); 442 | } 443 | const length = byteLength(string, encoding) | 0; 444 | let buf = createBuffer(length); 445 | const actual = buf.write(string, encoding); 446 | if (actual !== length) { 447 | buf = buf.slice(0, actual); 448 | } 449 | return buf; 450 | } 451 | function fromArrayLike(array) { 452 | const length = array.length < 0 ? 0 : checked(array.length) | 0; 453 | const buf = createBuffer(length); 454 | for (let i = 0; i < length; i += 1) { 455 | buf[i] = array[i] & 255; 456 | } 457 | return buf; 458 | } 459 | function fromArrayView(arrayView) { 460 | if (isInstance(arrayView, Uint8Array)) { 461 | const copy = new Uint8Array(arrayView); 462 | return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength); 463 | } 464 | return fromArrayLike(arrayView); 465 | } 466 | function fromArrayBuffer(array, byteOffset, length) { 467 | if (byteOffset < 0 || array.byteLength < byteOffset) { 468 | throw new RangeError('"offset" is outside of buffer bounds'); 469 | } 470 | if (array.byteLength < byteOffset + (length || 0)) { 471 | throw new RangeError('"length" is outside of buffer bounds'); 472 | } 473 | let buf; 474 | if (byteOffset === void 0 && length === void 0) { 475 | buf = new Uint8Array(array); 476 | } else if (length === void 0) { 477 | buf = new Uint8Array(array, byteOffset); 478 | } else { 479 | buf = new Uint8Array(array, byteOffset, length); 480 | } 481 | Object.setPrototypeOf(buf, Buffer3.prototype); 482 | return buf; 483 | } 484 | function fromObject(obj) { 485 | if (Buffer3.isBuffer(obj)) { 486 | const len = checked(obj.length) | 0; 487 | const buf = createBuffer(len); 488 | if (buf.length === 0) { 489 | return buf; 490 | } 491 | obj.copy(buf, 0, 0, len); 492 | return buf; 493 | } 494 | if (obj.length !== void 0) { 495 | if (typeof obj.length !== "number" || numberIsNaN(obj.length)) { 496 | return createBuffer(0); 497 | } 498 | return fromArrayLike(obj); 499 | } 500 | if (obj.type === "Buffer" && Array.isArray(obj.data)) { 501 | return fromArrayLike(obj.data); 502 | } 503 | } 504 | function checked(length) { 505 | if (length >= K_MAX_LENGTH) { 506 | throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes"); 507 | } 508 | return length | 0; 509 | } 510 | function SlowBuffer(length) { 511 | if (+length != length) { 512 | length = 0; 513 | } 514 | return Buffer3.alloc(+length); 515 | } 516 | Buffer3.isBuffer = function isBuffer(b) { 517 | return b != null && b._isBuffer === true && b !== Buffer3.prototype; 518 | }; 519 | Buffer3.compare = function compare(a, b) { 520 | if (isInstance(a, Uint8Array)) 521 | a = Buffer3.from(a, a.offset, a.byteLength); 522 | if (isInstance(b, Uint8Array)) 523 | b = Buffer3.from(b, b.offset, b.byteLength); 524 | if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) { 525 | throw new TypeError( 526 | 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' 527 | ); 528 | } 529 | if (a === b) 530 | return 0; 531 | let x = a.length; 532 | let y = b.length; 533 | for (let i = 0, len = Math.min(x, y); i < len; ++i) { 534 | if (a[i] !== b[i]) { 535 | x = a[i]; 536 | y = b[i]; 537 | break; 538 | } 539 | } 540 | if (x < y) 541 | return -1; 542 | if (y < x) 543 | return 1; 544 | return 0; 545 | }; 546 | Buffer3.isEncoding = function isEncoding(encoding) { 547 | switch (String(encoding).toLowerCase()) { 548 | case "hex": 549 | case "utf8": 550 | case "utf-8": 551 | case "ascii": 552 | case "latin1": 553 | case "binary": 554 | case "base64": 555 | case "ucs2": 556 | case "ucs-2": 557 | case "utf16le": 558 | case "utf-16le": 559 | return true; 560 | default: 561 | return false; 562 | } 563 | }; 564 | Buffer3.concat = function concat(list, length) { 565 | if (!Array.isArray(list)) { 566 | throw new TypeError('"list" argument must be an Array of Buffers'); 567 | } 568 | if (list.length === 0) { 569 | return Buffer3.alloc(0); 570 | } 571 | let i; 572 | if (length === void 0) { 573 | length = 0; 574 | for (i = 0; i < list.length; ++i) { 575 | length += list[i].length; 576 | } 577 | } 578 | const buffer = Buffer3.allocUnsafe(length); 579 | let pos = 0; 580 | for (i = 0; i < list.length; ++i) { 581 | let buf = list[i]; 582 | if (isInstance(buf, Uint8Array)) { 583 | if (pos + buf.length > buffer.length) { 584 | if (!Buffer3.isBuffer(buf)) 585 | buf = Buffer3.from(buf); 586 | buf.copy(buffer, pos); 587 | } else { 588 | Uint8Array.prototype.set.call( 589 | buffer, 590 | buf, 591 | pos 592 | ); 593 | } 594 | } else if (!Buffer3.isBuffer(buf)) { 595 | throw new TypeError('"list" argument must be an Array of Buffers'); 596 | } else { 597 | buf.copy(buffer, pos); 598 | } 599 | pos += buf.length; 600 | } 601 | return buffer; 602 | }; 603 | function byteLength(string, encoding) { 604 | if (Buffer3.isBuffer(string)) { 605 | return string.length; 606 | } 607 | if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { 608 | return string.byteLength; 609 | } 610 | if (typeof string !== "string") { 611 | throw new TypeError( 612 | 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string 613 | ); 614 | } 615 | const len = string.length; 616 | const mustMatch = arguments.length > 2 && arguments[2] === true; 617 | if (!mustMatch && len === 0) 618 | return 0; 619 | let loweredCase = false; 620 | for (; ; ) { 621 | switch (encoding) { 622 | case "ascii": 623 | case "latin1": 624 | case "binary": 625 | return len; 626 | case "utf8": 627 | case "utf-8": 628 | return utf8ToBytes(string).length; 629 | case "ucs2": 630 | case "ucs-2": 631 | case "utf16le": 632 | case "utf-16le": 633 | return len * 2; 634 | case "hex": 635 | return len >>> 1; 636 | case "base64": 637 | return base64ToBytes(string).length; 638 | default: 639 | if (loweredCase) { 640 | return mustMatch ? -1 : utf8ToBytes(string).length; 641 | } 642 | encoding = ("" + encoding).toLowerCase(); 643 | loweredCase = true; 644 | } 645 | } 646 | } 647 | Buffer3.byteLength = byteLength; 648 | function slowToString(encoding, start, end) { 649 | let loweredCase = false; 650 | if (start === void 0 || start < 0) { 651 | start = 0; 652 | } 653 | if (start > this.length) { 654 | return ""; 655 | } 656 | if (end === void 0 || end > this.length) { 657 | end = this.length; 658 | } 659 | if (end <= 0) { 660 | return ""; 661 | } 662 | end >>>= 0; 663 | start >>>= 0; 664 | if (end <= start) { 665 | return ""; 666 | } 667 | if (!encoding) 668 | encoding = "utf8"; 669 | while (true) { 670 | switch (encoding) { 671 | case "hex": 672 | return hexSlice(this, start, end); 673 | case "utf8": 674 | case "utf-8": 675 | return utf8Slice(this, start, end); 676 | case "ascii": 677 | return asciiSlice(this, start, end); 678 | case "latin1": 679 | case "binary": 680 | return latin1Slice(this, start, end); 681 | case "base64": 682 | return base64Slice(this, start, end); 683 | case "ucs2": 684 | case "ucs-2": 685 | case "utf16le": 686 | case "utf-16le": 687 | return utf16leSlice(this, start, end); 688 | default: 689 | if (loweredCase) 690 | throw new TypeError("Unknown encoding: " + encoding); 691 | encoding = (encoding + "").toLowerCase(); 692 | loweredCase = true; 693 | } 694 | } 695 | } 696 | Buffer3.prototype._isBuffer = true; 697 | function swap(b, n, m) { 698 | const i = b[n]; 699 | b[n] = b[m]; 700 | b[m] = i; 701 | } 702 | Buffer3.prototype.swap16 = function swap16() { 703 | const len = this.length; 704 | if (len % 2 !== 0) { 705 | throw new RangeError("Buffer size must be a multiple of 16-bits"); 706 | } 707 | for (let i = 0; i < len; i += 2) { 708 | swap(this, i, i + 1); 709 | } 710 | return this; 711 | }; 712 | Buffer3.prototype.swap32 = function swap32() { 713 | const len = this.length; 714 | if (len % 4 !== 0) { 715 | throw new RangeError("Buffer size must be a multiple of 32-bits"); 716 | } 717 | for (let i = 0; i < len; i += 4) { 718 | swap(this, i, i + 3); 719 | swap(this, i + 1, i + 2); 720 | } 721 | return this; 722 | }; 723 | Buffer3.prototype.swap64 = function swap64() { 724 | const len = this.length; 725 | if (len % 8 !== 0) { 726 | throw new RangeError("Buffer size must be a multiple of 64-bits"); 727 | } 728 | for (let i = 0; i < len; i += 8) { 729 | swap(this, i, i + 7); 730 | swap(this, i + 1, i + 6); 731 | swap(this, i + 2, i + 5); 732 | swap(this, i + 3, i + 4); 733 | } 734 | return this; 735 | }; 736 | Buffer3.prototype.toString = function toString() { 737 | const length = this.length; 738 | if (length === 0) 739 | return ""; 740 | if (arguments.length === 0) 741 | return utf8Slice(this, 0, length); 742 | return slowToString.apply(this, arguments); 743 | }; 744 | Buffer3.prototype.toLocaleString = Buffer3.prototype.toString; 745 | Buffer3.prototype.equals = function equals(b) { 746 | if (!Buffer3.isBuffer(b)) 747 | throw new TypeError("Argument must be a Buffer"); 748 | if (this === b) 749 | return true; 750 | return Buffer3.compare(this, b) === 0; 751 | }; 752 | Buffer3.prototype.inspect = function inspect() { 753 | let str = ""; 754 | const max = exports.INSPECT_MAX_BYTES; 755 | str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(); 756 | if (this.length > max) 757 | str += " ... "; 758 | return ""; 759 | }; 760 | if (customInspectSymbol) { 761 | Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect; 762 | } 763 | Buffer3.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { 764 | if (isInstance(target, Uint8Array)) { 765 | target = Buffer3.from(target, target.offset, target.byteLength); 766 | } 767 | if (!Buffer3.isBuffer(target)) { 768 | throw new TypeError( 769 | 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target 770 | ); 771 | } 772 | if (start === void 0) { 773 | start = 0; 774 | } 775 | if (end === void 0) { 776 | end = target ? target.length : 0; 777 | } 778 | if (thisStart === void 0) { 779 | thisStart = 0; 780 | } 781 | if (thisEnd === void 0) { 782 | thisEnd = this.length; 783 | } 784 | if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { 785 | throw new RangeError("out of range index"); 786 | } 787 | if (thisStart >= thisEnd && start >= end) { 788 | return 0; 789 | } 790 | if (thisStart >= thisEnd) { 791 | return -1; 792 | } 793 | if (start >= end) { 794 | return 1; 795 | } 796 | start >>>= 0; 797 | end >>>= 0; 798 | thisStart >>>= 0; 799 | thisEnd >>>= 0; 800 | if (this === target) 801 | return 0; 802 | let x = thisEnd - thisStart; 803 | let y = end - start; 804 | const len = Math.min(x, y); 805 | const thisCopy = this.slice(thisStart, thisEnd); 806 | const targetCopy = target.slice(start, end); 807 | for (let i = 0; i < len; ++i) { 808 | if (thisCopy[i] !== targetCopy[i]) { 809 | x = thisCopy[i]; 810 | y = targetCopy[i]; 811 | break; 812 | } 813 | } 814 | if (x < y) 815 | return -1; 816 | if (y < x) 817 | return 1; 818 | return 0; 819 | }; 820 | function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { 821 | if (buffer.length === 0) 822 | return -1; 823 | if (typeof byteOffset === "string") { 824 | encoding = byteOffset; 825 | byteOffset = 0; 826 | } else if (byteOffset > 2147483647) { 827 | byteOffset = 2147483647; 828 | } else if (byteOffset < -2147483648) { 829 | byteOffset = -2147483648; 830 | } 831 | byteOffset = +byteOffset; 832 | if (numberIsNaN(byteOffset)) { 833 | byteOffset = dir ? 0 : buffer.length - 1; 834 | } 835 | if (byteOffset < 0) 836 | byteOffset = buffer.length + byteOffset; 837 | if (byteOffset >= buffer.length) { 838 | if (dir) 839 | return -1; 840 | else 841 | byteOffset = buffer.length - 1; 842 | } else if (byteOffset < 0) { 843 | if (dir) 844 | byteOffset = 0; 845 | else 846 | return -1; 847 | } 848 | if (typeof val === "string") { 849 | val = Buffer3.from(val, encoding); 850 | } 851 | if (Buffer3.isBuffer(val)) { 852 | if (val.length === 0) { 853 | return -1; 854 | } 855 | return arrayIndexOf(buffer, val, byteOffset, encoding, dir); 856 | } else if (typeof val === "number") { 857 | val = val & 255; 858 | if (typeof Uint8Array.prototype.indexOf === "function") { 859 | if (dir) { 860 | return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); 861 | } else { 862 | return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); 863 | } 864 | } 865 | return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); 866 | } 867 | throw new TypeError("val must be string, number or Buffer"); 868 | } 869 | function arrayIndexOf(arr, val, byteOffset, encoding, dir) { 870 | let indexSize = 1; 871 | let arrLength = arr.length; 872 | let valLength = val.length; 873 | if (encoding !== void 0) { 874 | encoding = String(encoding).toLowerCase(); 875 | if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") { 876 | if (arr.length < 2 || val.length < 2) { 877 | return -1; 878 | } 879 | indexSize = 2; 880 | arrLength /= 2; 881 | valLength /= 2; 882 | byteOffset /= 2; 883 | } 884 | } 885 | function read(buf, i2) { 886 | if (indexSize === 1) { 887 | return buf[i2]; 888 | } else { 889 | return buf.readUInt16BE(i2 * indexSize); 890 | } 891 | } 892 | let i; 893 | if (dir) { 894 | let foundIndex = -1; 895 | for (i = byteOffset; i < arrLength; i++) { 896 | if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { 897 | if (foundIndex === -1) 898 | foundIndex = i; 899 | if (i - foundIndex + 1 === valLength) 900 | return foundIndex * indexSize; 901 | } else { 902 | if (foundIndex !== -1) 903 | i -= i - foundIndex; 904 | foundIndex = -1; 905 | } 906 | } 907 | } else { 908 | if (byteOffset + valLength > arrLength) 909 | byteOffset = arrLength - valLength; 910 | for (i = byteOffset; i >= 0; i--) { 911 | let found = true; 912 | for (let j = 0; j < valLength; j++) { 913 | if (read(arr, i + j) !== read(val, j)) { 914 | found = false; 915 | break; 916 | } 917 | } 918 | if (found) 919 | return i; 920 | } 921 | } 922 | return -1; 923 | } 924 | Buffer3.prototype.includes = function includes(val, byteOffset, encoding) { 925 | return this.indexOf(val, byteOffset, encoding) !== -1; 926 | }; 927 | Buffer3.prototype.indexOf = function indexOf(val, byteOffset, encoding) { 928 | return bidirectionalIndexOf(this, val, byteOffset, encoding, true); 929 | }; 930 | Buffer3.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { 931 | return bidirectionalIndexOf(this, val, byteOffset, encoding, false); 932 | }; 933 | function hexWrite(buf, string, offset, length) { 934 | offset = Number(offset) || 0; 935 | const remaining = buf.length - offset; 936 | if (!length) { 937 | length = remaining; 938 | } else { 939 | length = Number(length); 940 | if (length > remaining) { 941 | length = remaining; 942 | } 943 | } 944 | const strLen = string.length; 945 | if (length > strLen / 2) { 946 | length = strLen / 2; 947 | } 948 | let i; 949 | for (i = 0; i < length; ++i) { 950 | const parsed = parseInt(string.substr(i * 2, 2), 16); 951 | if (numberIsNaN(parsed)) 952 | return i; 953 | buf[offset + i] = parsed; 954 | } 955 | return i; 956 | } 957 | function utf8Write(buf, string, offset, length) { 958 | return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); 959 | } 960 | function asciiWrite(buf, string, offset, length) { 961 | return blitBuffer(asciiToBytes(string), buf, offset, length); 962 | } 963 | function base64Write(buf, string, offset, length) { 964 | return blitBuffer(base64ToBytes(string), buf, offset, length); 965 | } 966 | function ucs2Write(buf, string, offset, length) { 967 | return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); 968 | } 969 | Buffer3.prototype.write = function write(string, offset, length, encoding) { 970 | if (offset === void 0) { 971 | encoding = "utf8"; 972 | length = this.length; 973 | offset = 0; 974 | } else if (length === void 0 && typeof offset === "string") { 975 | encoding = offset; 976 | length = this.length; 977 | offset = 0; 978 | } else if (isFinite(offset)) { 979 | offset = offset >>> 0; 980 | if (isFinite(length)) { 981 | length = length >>> 0; 982 | if (encoding === void 0) 983 | encoding = "utf8"; 984 | } else { 985 | encoding = length; 986 | length = void 0; 987 | } 988 | } else { 989 | throw new Error( 990 | "Buffer.write(string, encoding, offset[, length]) is no longer supported" 991 | ); 992 | } 993 | const remaining = this.length - offset; 994 | if (length === void 0 || length > remaining) 995 | length = remaining; 996 | if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { 997 | throw new RangeError("Attempt to write outside buffer bounds"); 998 | } 999 | if (!encoding) 1000 | encoding = "utf8"; 1001 | let loweredCase = false; 1002 | for (; ; ) { 1003 | switch (encoding) { 1004 | case "hex": 1005 | return hexWrite(this, string, offset, length); 1006 | case "utf8": 1007 | case "utf-8": 1008 | return utf8Write(this, string, offset, length); 1009 | case "ascii": 1010 | case "latin1": 1011 | case "binary": 1012 | return asciiWrite(this, string, offset, length); 1013 | case "base64": 1014 | return base64Write(this, string, offset, length); 1015 | case "ucs2": 1016 | case "ucs-2": 1017 | case "utf16le": 1018 | case "utf-16le": 1019 | return ucs2Write(this, string, offset, length); 1020 | default: 1021 | if (loweredCase) 1022 | throw new TypeError("Unknown encoding: " + encoding); 1023 | encoding = ("" + encoding).toLowerCase(); 1024 | loweredCase = true; 1025 | } 1026 | } 1027 | }; 1028 | Buffer3.prototype.toJSON = function toJSON() { 1029 | return { 1030 | type: "Buffer", 1031 | data: Array.prototype.slice.call(this._arr || this, 0) 1032 | }; 1033 | }; 1034 | function base64Slice(buf, start, end) { 1035 | if (start === 0 && end === buf.length) { 1036 | return base64.fromByteArray(buf); 1037 | } else { 1038 | return base64.fromByteArray(buf.slice(start, end)); 1039 | } 1040 | } 1041 | function utf8Slice(buf, start, end) { 1042 | end = Math.min(buf.length, end); 1043 | const res = []; 1044 | let i = start; 1045 | while (i < end) { 1046 | const firstByte = buf[i]; 1047 | let codePoint = null; 1048 | let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; 1049 | if (i + bytesPerSequence <= end) { 1050 | let secondByte, thirdByte, fourthByte, tempCodePoint; 1051 | switch (bytesPerSequence) { 1052 | case 1: 1053 | if (firstByte < 128) { 1054 | codePoint = firstByte; 1055 | } 1056 | break; 1057 | case 2: 1058 | secondByte = buf[i + 1]; 1059 | if ((secondByte & 192) === 128) { 1060 | tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; 1061 | if (tempCodePoint > 127) { 1062 | codePoint = tempCodePoint; 1063 | } 1064 | } 1065 | break; 1066 | case 3: 1067 | secondByte = buf[i + 1]; 1068 | thirdByte = buf[i + 2]; 1069 | if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { 1070 | tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; 1071 | if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { 1072 | codePoint = tempCodePoint; 1073 | } 1074 | } 1075 | break; 1076 | case 4: 1077 | secondByte = buf[i + 1]; 1078 | thirdByte = buf[i + 2]; 1079 | fourthByte = buf[i + 3]; 1080 | if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { 1081 | tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; 1082 | if (tempCodePoint > 65535 && tempCodePoint < 1114112) { 1083 | codePoint = tempCodePoint; 1084 | } 1085 | } 1086 | } 1087 | } 1088 | if (codePoint === null) { 1089 | codePoint = 65533; 1090 | bytesPerSequence = 1; 1091 | } else if (codePoint > 65535) { 1092 | codePoint -= 65536; 1093 | res.push(codePoint >>> 10 & 1023 | 55296); 1094 | codePoint = 56320 | codePoint & 1023; 1095 | } 1096 | res.push(codePoint); 1097 | i += bytesPerSequence; 1098 | } 1099 | return decodeCodePointsArray(res); 1100 | } 1101 | var MAX_ARGUMENTS_LENGTH = 4096; 1102 | function decodeCodePointsArray(codePoints) { 1103 | const len = codePoints.length; 1104 | if (len <= MAX_ARGUMENTS_LENGTH) { 1105 | return String.fromCharCode.apply(String, codePoints); 1106 | } 1107 | let res = ""; 1108 | let i = 0; 1109 | while (i < len) { 1110 | res += String.fromCharCode.apply( 1111 | String, 1112 | codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) 1113 | ); 1114 | } 1115 | return res; 1116 | } 1117 | function asciiSlice(buf, start, end) { 1118 | let ret = ""; 1119 | end = Math.min(buf.length, end); 1120 | for (let i = start; i < end; ++i) { 1121 | ret += String.fromCharCode(buf[i] & 127); 1122 | } 1123 | return ret; 1124 | } 1125 | function latin1Slice(buf, start, end) { 1126 | let ret = ""; 1127 | end = Math.min(buf.length, end); 1128 | for (let i = start; i < end; ++i) { 1129 | ret += String.fromCharCode(buf[i]); 1130 | } 1131 | return ret; 1132 | } 1133 | function hexSlice(buf, start, end) { 1134 | const len = buf.length; 1135 | if (!start || start < 0) 1136 | start = 0; 1137 | if (!end || end < 0 || end > len) 1138 | end = len; 1139 | let out = ""; 1140 | for (let i = start; i < end; ++i) { 1141 | out += hexSliceLookupTable[buf[i]]; 1142 | } 1143 | return out; 1144 | } 1145 | function utf16leSlice(buf, start, end) { 1146 | const bytes = buf.slice(start, end); 1147 | let res = ""; 1148 | for (let i = 0; i < bytes.length - 1; i += 2) { 1149 | res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); 1150 | } 1151 | return res; 1152 | } 1153 | Buffer3.prototype.slice = function slice(start, end) { 1154 | const len = this.length; 1155 | start = ~~start; 1156 | end = end === void 0 ? len : ~~end; 1157 | if (start < 0) { 1158 | start += len; 1159 | if (start < 0) 1160 | start = 0; 1161 | } else if (start > len) { 1162 | start = len; 1163 | } 1164 | if (end < 0) { 1165 | end += len; 1166 | if (end < 0) 1167 | end = 0; 1168 | } else if (end > len) { 1169 | end = len; 1170 | } 1171 | if (end < start) 1172 | end = start; 1173 | const newBuf = this.subarray(start, end); 1174 | Object.setPrototypeOf(newBuf, Buffer3.prototype); 1175 | return newBuf; 1176 | }; 1177 | function checkOffset(offset, ext, length) { 1178 | if (offset % 1 !== 0 || offset < 0) 1179 | throw new RangeError("offset is not uint"); 1180 | if (offset + ext > length) 1181 | throw new RangeError("Trying to access beyond buffer length"); 1182 | } 1183 | Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { 1184 | offset = offset >>> 0; 1185 | byteLength2 = byteLength2 >>> 0; 1186 | if (!noAssert) 1187 | checkOffset(offset, byteLength2, this.length); 1188 | let val = this[offset]; 1189 | let mul = 1; 1190 | let i = 0; 1191 | while (++i < byteLength2 && (mul *= 256)) { 1192 | val += this[offset + i] * mul; 1193 | } 1194 | return val; 1195 | }; 1196 | Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { 1197 | offset = offset >>> 0; 1198 | byteLength2 = byteLength2 >>> 0; 1199 | if (!noAssert) { 1200 | checkOffset(offset, byteLength2, this.length); 1201 | } 1202 | let val = this[offset + --byteLength2]; 1203 | let mul = 1; 1204 | while (byteLength2 > 0 && (mul *= 256)) { 1205 | val += this[offset + --byteLength2] * mul; 1206 | } 1207 | return val; 1208 | }; 1209 | Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = function readUInt8(offset, noAssert) { 1210 | offset = offset >>> 0; 1211 | if (!noAssert) 1212 | checkOffset(offset, 1, this.length); 1213 | return this[offset]; 1214 | }; 1215 | Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { 1216 | offset = offset >>> 0; 1217 | if (!noAssert) 1218 | checkOffset(offset, 2, this.length); 1219 | return this[offset] | this[offset + 1] << 8; 1220 | }; 1221 | Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { 1222 | offset = offset >>> 0; 1223 | if (!noAssert) 1224 | checkOffset(offset, 2, this.length); 1225 | return this[offset] << 8 | this[offset + 1]; 1226 | }; 1227 | Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { 1228 | offset = offset >>> 0; 1229 | if (!noAssert) 1230 | checkOffset(offset, 4, this.length); 1231 | return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216; 1232 | }; 1233 | Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { 1234 | offset = offset >>> 0; 1235 | if (!noAssert) 1236 | checkOffset(offset, 4, this.length); 1237 | return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); 1238 | }; 1239 | Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) { 1240 | offset = offset >>> 0; 1241 | validateNumber(offset, "offset"); 1242 | const first = this[offset]; 1243 | const last = this[offset + 7]; 1244 | if (first === void 0 || last === void 0) { 1245 | boundsError(offset, this.length - 8); 1246 | } 1247 | const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24; 1248 | const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24; 1249 | return BigInt(lo) + (BigInt(hi) << BigInt(32)); 1250 | }); 1251 | Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) { 1252 | offset = offset >>> 0; 1253 | validateNumber(offset, "offset"); 1254 | const first = this[offset]; 1255 | const last = this[offset + 7]; 1256 | if (first === void 0 || last === void 0) { 1257 | boundsError(offset, this.length - 8); 1258 | } 1259 | const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; 1260 | const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last; 1261 | return (BigInt(hi) << BigInt(32)) + BigInt(lo); 1262 | }); 1263 | Buffer3.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { 1264 | offset = offset >>> 0; 1265 | byteLength2 = byteLength2 >>> 0; 1266 | if (!noAssert) 1267 | checkOffset(offset, byteLength2, this.length); 1268 | let val = this[offset]; 1269 | let mul = 1; 1270 | let i = 0; 1271 | while (++i < byteLength2 && (mul *= 256)) { 1272 | val += this[offset + i] * mul; 1273 | } 1274 | mul *= 128; 1275 | if (val >= mul) 1276 | val -= Math.pow(2, 8 * byteLength2); 1277 | return val; 1278 | }; 1279 | Buffer3.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { 1280 | offset = offset >>> 0; 1281 | byteLength2 = byteLength2 >>> 0; 1282 | if (!noAssert) 1283 | checkOffset(offset, byteLength2, this.length); 1284 | let i = byteLength2; 1285 | let mul = 1; 1286 | let val = this[offset + --i]; 1287 | while (i > 0 && (mul *= 256)) { 1288 | val += this[offset + --i] * mul; 1289 | } 1290 | mul *= 128; 1291 | if (val >= mul) 1292 | val -= Math.pow(2, 8 * byteLength2); 1293 | return val; 1294 | }; 1295 | Buffer3.prototype.readInt8 = function readInt8(offset, noAssert) { 1296 | offset = offset >>> 0; 1297 | if (!noAssert) 1298 | checkOffset(offset, 1, this.length); 1299 | if (!(this[offset] & 128)) 1300 | return this[offset]; 1301 | return (255 - this[offset] + 1) * -1; 1302 | }; 1303 | Buffer3.prototype.readInt16LE = function readInt16LE(offset, noAssert) { 1304 | offset = offset >>> 0; 1305 | if (!noAssert) 1306 | checkOffset(offset, 2, this.length); 1307 | const val = this[offset] | this[offset + 1] << 8; 1308 | return val & 32768 ? val | 4294901760 : val; 1309 | }; 1310 | Buffer3.prototype.readInt16BE = function readInt16BE(offset, noAssert) { 1311 | offset = offset >>> 0; 1312 | if (!noAssert) 1313 | checkOffset(offset, 2, this.length); 1314 | const val = this[offset + 1] | this[offset] << 8; 1315 | return val & 32768 ? val | 4294901760 : val; 1316 | }; 1317 | Buffer3.prototype.readInt32LE = function readInt32LE(offset, noAssert) { 1318 | offset = offset >>> 0; 1319 | if (!noAssert) 1320 | checkOffset(offset, 4, this.length); 1321 | return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; 1322 | }; 1323 | Buffer3.prototype.readInt32BE = function readInt32BE(offset, noAssert) { 1324 | offset = offset >>> 0; 1325 | if (!noAssert) 1326 | checkOffset(offset, 4, this.length); 1327 | return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; 1328 | }; 1329 | Buffer3.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) { 1330 | offset = offset >>> 0; 1331 | validateNumber(offset, "offset"); 1332 | const first = this[offset]; 1333 | const last = this[offset + 7]; 1334 | if (first === void 0 || last === void 0) { 1335 | boundsError(offset, this.length - 8); 1336 | } 1337 | const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24); 1338 | return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24); 1339 | }); 1340 | Buffer3.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) { 1341 | offset = offset >>> 0; 1342 | validateNumber(offset, "offset"); 1343 | const first = this[offset]; 1344 | const last = this[offset + 7]; 1345 | if (first === void 0 || last === void 0) { 1346 | boundsError(offset, this.length - 8); 1347 | } 1348 | const val = (first << 24) + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; 1349 | return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last); 1350 | }); 1351 | Buffer3.prototype.readFloatLE = function readFloatLE(offset, noAssert) { 1352 | offset = offset >>> 0; 1353 | if (!noAssert) 1354 | checkOffset(offset, 4, this.length); 1355 | return ieee754.read(this, offset, true, 23, 4); 1356 | }; 1357 | Buffer3.prototype.readFloatBE = function readFloatBE(offset, noAssert) { 1358 | offset = offset >>> 0; 1359 | if (!noAssert) 1360 | checkOffset(offset, 4, this.length); 1361 | return ieee754.read(this, offset, false, 23, 4); 1362 | }; 1363 | Buffer3.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { 1364 | offset = offset >>> 0; 1365 | if (!noAssert) 1366 | checkOffset(offset, 8, this.length); 1367 | return ieee754.read(this, offset, true, 52, 8); 1368 | }; 1369 | Buffer3.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { 1370 | offset = offset >>> 0; 1371 | if (!noAssert) 1372 | checkOffset(offset, 8, this.length); 1373 | return ieee754.read(this, offset, false, 52, 8); 1374 | }; 1375 | function checkInt(buf, value, offset, ext, max, min) { 1376 | if (!Buffer3.isBuffer(buf)) 1377 | throw new TypeError('"buffer" argument must be a Buffer instance'); 1378 | if (value > max || value < min) 1379 | throw new RangeError('"value" argument is out of bounds'); 1380 | if (offset + ext > buf.length) 1381 | throw new RangeError("Index out of range"); 1382 | } 1383 | Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { 1384 | value = +value; 1385 | offset = offset >>> 0; 1386 | byteLength2 = byteLength2 >>> 0; 1387 | if (!noAssert) { 1388 | const maxBytes = Math.pow(2, 8 * byteLength2) - 1; 1389 | checkInt(this, value, offset, byteLength2, maxBytes, 0); 1390 | } 1391 | let mul = 1; 1392 | let i = 0; 1393 | this[offset] = value & 255; 1394 | while (++i < byteLength2 && (mul *= 256)) { 1395 | this[offset + i] = value / mul & 255; 1396 | } 1397 | return offset + byteLength2; 1398 | }; 1399 | Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { 1400 | value = +value; 1401 | offset = offset >>> 0; 1402 | byteLength2 = byteLength2 >>> 0; 1403 | if (!noAssert) { 1404 | const maxBytes = Math.pow(2, 8 * byteLength2) - 1; 1405 | checkInt(this, value, offset, byteLength2, maxBytes, 0); 1406 | } 1407 | let i = byteLength2 - 1; 1408 | let mul = 1; 1409 | this[offset + i] = value & 255; 1410 | while (--i >= 0 && (mul *= 256)) { 1411 | this[offset + i] = value / mul & 255; 1412 | } 1413 | return offset + byteLength2; 1414 | }; 1415 | Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { 1416 | value = +value; 1417 | offset = offset >>> 0; 1418 | if (!noAssert) 1419 | checkInt(this, value, offset, 1, 255, 0); 1420 | this[offset] = value & 255; 1421 | return offset + 1; 1422 | }; 1423 | Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { 1424 | value = +value; 1425 | offset = offset >>> 0; 1426 | if (!noAssert) 1427 | checkInt(this, value, offset, 2, 65535, 0); 1428 | this[offset] = value & 255; 1429 | this[offset + 1] = value >>> 8; 1430 | return offset + 2; 1431 | }; 1432 | Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { 1433 | value = +value; 1434 | offset = offset >>> 0; 1435 | if (!noAssert) 1436 | checkInt(this, value, offset, 2, 65535, 0); 1437 | this[offset] = value >>> 8; 1438 | this[offset + 1] = value & 255; 1439 | return offset + 2; 1440 | }; 1441 | Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { 1442 | value = +value; 1443 | offset = offset >>> 0; 1444 | if (!noAssert) 1445 | checkInt(this, value, offset, 4, 4294967295, 0); 1446 | this[offset + 3] = value >>> 24; 1447 | this[offset + 2] = value >>> 16; 1448 | this[offset + 1] = value >>> 8; 1449 | this[offset] = value & 255; 1450 | return offset + 4; 1451 | }; 1452 | Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { 1453 | value = +value; 1454 | offset = offset >>> 0; 1455 | if (!noAssert) 1456 | checkInt(this, value, offset, 4, 4294967295, 0); 1457 | this[offset] = value >>> 24; 1458 | this[offset + 1] = value >>> 16; 1459 | this[offset + 2] = value >>> 8; 1460 | this[offset + 3] = value & 255; 1461 | return offset + 4; 1462 | }; 1463 | function wrtBigUInt64LE(buf, value, offset, min, max) { 1464 | checkIntBI(value, min, max, buf, offset, 7); 1465 | let lo = Number(value & BigInt(4294967295)); 1466 | buf[offset++] = lo; 1467 | lo = lo >> 8; 1468 | buf[offset++] = lo; 1469 | lo = lo >> 8; 1470 | buf[offset++] = lo; 1471 | lo = lo >> 8; 1472 | buf[offset++] = lo; 1473 | let hi = Number(value >> BigInt(32) & BigInt(4294967295)); 1474 | buf[offset++] = hi; 1475 | hi = hi >> 8; 1476 | buf[offset++] = hi; 1477 | hi = hi >> 8; 1478 | buf[offset++] = hi; 1479 | hi = hi >> 8; 1480 | buf[offset++] = hi; 1481 | return offset; 1482 | } 1483 | function wrtBigUInt64BE(buf, value, offset, min, max) { 1484 | checkIntBI(value, min, max, buf, offset, 7); 1485 | let lo = Number(value & BigInt(4294967295)); 1486 | buf[offset + 7] = lo; 1487 | lo = lo >> 8; 1488 | buf[offset + 6] = lo; 1489 | lo = lo >> 8; 1490 | buf[offset + 5] = lo; 1491 | lo = lo >> 8; 1492 | buf[offset + 4] = lo; 1493 | let hi = Number(value >> BigInt(32) & BigInt(4294967295)); 1494 | buf[offset + 3] = hi; 1495 | hi = hi >> 8; 1496 | buf[offset + 2] = hi; 1497 | hi = hi >> 8; 1498 | buf[offset + 1] = hi; 1499 | hi = hi >> 8; 1500 | buf[offset] = hi; 1501 | return offset + 8; 1502 | } 1503 | Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) { 1504 | return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff")); 1505 | }); 1506 | Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) { 1507 | return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff")); 1508 | }); 1509 | Buffer3.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { 1510 | value = +value; 1511 | offset = offset >>> 0; 1512 | if (!noAssert) { 1513 | const limit = Math.pow(2, 8 * byteLength2 - 1); 1514 | checkInt(this, value, offset, byteLength2, limit - 1, -limit); 1515 | } 1516 | let i = 0; 1517 | let mul = 1; 1518 | let sub = 0; 1519 | this[offset] = value & 255; 1520 | while (++i < byteLength2 && (mul *= 256)) { 1521 | if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { 1522 | sub = 1; 1523 | } 1524 | this[offset + i] = (value / mul >> 0) - sub & 255; 1525 | } 1526 | return offset + byteLength2; 1527 | }; 1528 | Buffer3.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { 1529 | value = +value; 1530 | offset = offset >>> 0; 1531 | if (!noAssert) { 1532 | const limit = Math.pow(2, 8 * byteLength2 - 1); 1533 | checkInt(this, value, offset, byteLength2, limit - 1, -limit); 1534 | } 1535 | let i = byteLength2 - 1; 1536 | let mul = 1; 1537 | let sub = 0; 1538 | this[offset + i] = value & 255; 1539 | while (--i >= 0 && (mul *= 256)) { 1540 | if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { 1541 | sub = 1; 1542 | } 1543 | this[offset + i] = (value / mul >> 0) - sub & 255; 1544 | } 1545 | return offset + byteLength2; 1546 | }; 1547 | Buffer3.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { 1548 | value = +value; 1549 | offset = offset >>> 0; 1550 | if (!noAssert) 1551 | checkInt(this, value, offset, 1, 127, -128); 1552 | if (value < 0) 1553 | value = 255 + value + 1; 1554 | this[offset] = value & 255; 1555 | return offset + 1; 1556 | }; 1557 | Buffer3.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { 1558 | value = +value; 1559 | offset = offset >>> 0; 1560 | if (!noAssert) 1561 | checkInt(this, value, offset, 2, 32767, -32768); 1562 | this[offset] = value & 255; 1563 | this[offset + 1] = value >>> 8; 1564 | return offset + 2; 1565 | }; 1566 | Buffer3.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { 1567 | value = +value; 1568 | offset = offset >>> 0; 1569 | if (!noAssert) 1570 | checkInt(this, value, offset, 2, 32767, -32768); 1571 | this[offset] = value >>> 8; 1572 | this[offset + 1] = value & 255; 1573 | return offset + 2; 1574 | }; 1575 | Buffer3.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { 1576 | value = +value; 1577 | offset = offset >>> 0; 1578 | if (!noAssert) 1579 | checkInt(this, value, offset, 4, 2147483647, -2147483648); 1580 | this[offset] = value & 255; 1581 | this[offset + 1] = value >>> 8; 1582 | this[offset + 2] = value >>> 16; 1583 | this[offset + 3] = value >>> 24; 1584 | return offset + 4; 1585 | }; 1586 | Buffer3.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { 1587 | value = +value; 1588 | offset = offset >>> 0; 1589 | if (!noAssert) 1590 | checkInt(this, value, offset, 4, 2147483647, -2147483648); 1591 | if (value < 0) 1592 | value = 4294967295 + value + 1; 1593 | this[offset] = value >>> 24; 1594 | this[offset + 1] = value >>> 16; 1595 | this[offset + 2] = value >>> 8; 1596 | this[offset + 3] = value & 255; 1597 | return offset + 4; 1598 | }; 1599 | Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) { 1600 | return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); 1601 | }); 1602 | Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) { 1603 | return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); 1604 | }); 1605 | function checkIEEE754(buf, value, offset, ext, max, min) { 1606 | if (offset + ext > buf.length) 1607 | throw new RangeError("Index out of range"); 1608 | if (offset < 0) 1609 | throw new RangeError("Index out of range"); 1610 | } 1611 | function writeFloat(buf, value, offset, littleEndian, noAssert) { 1612 | value = +value; 1613 | offset = offset >>> 0; 1614 | if (!noAssert) { 1615 | checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22); 1616 | } 1617 | ieee754.write(buf, value, offset, littleEndian, 23, 4); 1618 | return offset + 4; 1619 | } 1620 | Buffer3.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { 1621 | return writeFloat(this, value, offset, true, noAssert); 1622 | }; 1623 | Buffer3.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { 1624 | return writeFloat(this, value, offset, false, noAssert); 1625 | }; 1626 | function writeDouble(buf, value, offset, littleEndian, noAssert) { 1627 | value = +value; 1628 | offset = offset >>> 0; 1629 | if (!noAssert) { 1630 | checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292); 1631 | } 1632 | ieee754.write(buf, value, offset, littleEndian, 52, 8); 1633 | return offset + 8; 1634 | } 1635 | Buffer3.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { 1636 | return writeDouble(this, value, offset, true, noAssert); 1637 | }; 1638 | Buffer3.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { 1639 | return writeDouble(this, value, offset, false, noAssert); 1640 | }; 1641 | Buffer3.prototype.copy = function copy(target, targetStart, start, end) { 1642 | if (!Buffer3.isBuffer(target)) 1643 | throw new TypeError("argument should be a Buffer"); 1644 | if (!start) 1645 | start = 0; 1646 | if (!end && end !== 0) 1647 | end = this.length; 1648 | if (targetStart >= target.length) 1649 | targetStart = target.length; 1650 | if (!targetStart) 1651 | targetStart = 0; 1652 | if (end > 0 && end < start) 1653 | end = start; 1654 | if (end === start) 1655 | return 0; 1656 | if (target.length === 0 || this.length === 0) 1657 | return 0; 1658 | if (targetStart < 0) { 1659 | throw new RangeError("targetStart out of bounds"); 1660 | } 1661 | if (start < 0 || start >= this.length) 1662 | throw new RangeError("Index out of range"); 1663 | if (end < 0) 1664 | throw new RangeError("sourceEnd out of bounds"); 1665 | if (end > this.length) 1666 | end = this.length; 1667 | if (target.length - targetStart < end - start) { 1668 | end = target.length - targetStart + start; 1669 | } 1670 | const len = end - start; 1671 | if (this === target && typeof Uint8Array.prototype.copyWithin === "function") { 1672 | this.copyWithin(targetStart, start, end); 1673 | } else { 1674 | Uint8Array.prototype.set.call( 1675 | target, 1676 | this.subarray(start, end), 1677 | targetStart 1678 | ); 1679 | } 1680 | return len; 1681 | }; 1682 | Buffer3.prototype.fill = function fill(val, start, end, encoding) { 1683 | if (typeof val === "string") { 1684 | if (typeof start === "string") { 1685 | encoding = start; 1686 | start = 0; 1687 | end = this.length; 1688 | } else if (typeof end === "string") { 1689 | encoding = end; 1690 | end = this.length; 1691 | } 1692 | if (encoding !== void 0 && typeof encoding !== "string") { 1693 | throw new TypeError("encoding must be a string"); 1694 | } 1695 | if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) { 1696 | throw new TypeError("Unknown encoding: " + encoding); 1697 | } 1698 | if (val.length === 1) { 1699 | const code = val.charCodeAt(0); 1700 | if (encoding === "utf8" && code < 128 || encoding === "latin1") { 1701 | val = code; 1702 | } 1703 | } 1704 | } else if (typeof val === "number") { 1705 | val = val & 255; 1706 | } else if (typeof val === "boolean") { 1707 | val = Number(val); 1708 | } 1709 | if (start < 0 || this.length < start || this.length < end) { 1710 | throw new RangeError("Out of range index"); 1711 | } 1712 | if (end <= start) { 1713 | return this; 1714 | } 1715 | start = start >>> 0; 1716 | end = end === void 0 ? this.length : end >>> 0; 1717 | if (!val) 1718 | val = 0; 1719 | let i; 1720 | if (typeof val === "number") { 1721 | for (i = start; i < end; ++i) { 1722 | this[i] = val; 1723 | } 1724 | } else { 1725 | const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding); 1726 | const len = bytes.length; 1727 | if (len === 0) { 1728 | throw new TypeError('The value "' + val + '" is invalid for argument "value"'); 1729 | } 1730 | for (i = 0; i < end - start; ++i) { 1731 | this[i + start] = bytes[i % len]; 1732 | } 1733 | } 1734 | return this; 1735 | }; 1736 | var errors = {}; 1737 | function E(sym, getMessage, Base) { 1738 | errors[sym] = class NodeError extends Base { 1739 | constructor() { 1740 | super(); 1741 | Object.defineProperty(this, "message", { 1742 | value: getMessage.apply(this, arguments), 1743 | writable: true, 1744 | configurable: true 1745 | }); 1746 | this.name = `${this.name} [${sym}]`; 1747 | this.stack; 1748 | delete this.name; 1749 | } 1750 | get code() { 1751 | return sym; 1752 | } 1753 | set code(value) { 1754 | Object.defineProperty(this, "code", { 1755 | configurable: true, 1756 | enumerable: true, 1757 | value, 1758 | writable: true 1759 | }); 1760 | } 1761 | toString() { 1762 | return `${this.name} [${sym}]: ${this.message}`; 1763 | } 1764 | }; 1765 | } 1766 | E( 1767 | "ERR_BUFFER_OUT_OF_BOUNDS", 1768 | function(name) { 1769 | if (name) { 1770 | return `${name} is outside of buffer bounds`; 1771 | } 1772 | return "Attempt to access memory outside buffer bounds"; 1773 | }, 1774 | RangeError 1775 | ); 1776 | E( 1777 | "ERR_INVALID_ARG_TYPE", 1778 | function(name, actual) { 1779 | return `The "${name}" argument must be of type number. Received type ${typeof actual}`; 1780 | }, 1781 | TypeError 1782 | ); 1783 | E( 1784 | "ERR_OUT_OF_RANGE", 1785 | function(str, range, input) { 1786 | let msg = `The value of "${str}" is out of range.`; 1787 | let received = input; 1788 | if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { 1789 | received = addNumericalSeparator(String(input)); 1790 | } else if (typeof input === "bigint") { 1791 | received = String(input); 1792 | if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) { 1793 | received = addNumericalSeparator(received); 1794 | } 1795 | received += "n"; 1796 | } 1797 | msg += ` It must be ${range}. Received ${received}`; 1798 | return msg; 1799 | }, 1800 | RangeError 1801 | ); 1802 | function addNumericalSeparator(val) { 1803 | let res = ""; 1804 | let i = val.length; 1805 | const start = val[0] === "-" ? 1 : 0; 1806 | for (; i >= start + 4; i -= 3) { 1807 | res = `_${val.slice(i - 3, i)}${res}`; 1808 | } 1809 | return `${val.slice(0, i)}${res}`; 1810 | } 1811 | function checkBounds(buf, offset, byteLength2) { 1812 | validateNumber(offset, "offset"); 1813 | if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) { 1814 | boundsError(offset, buf.length - (byteLength2 + 1)); 1815 | } 1816 | } 1817 | function checkIntBI(value, min, max, buf, offset, byteLength2) { 1818 | if (value > max || value < min) { 1819 | const n = typeof min === "bigint" ? "n" : ""; 1820 | let range; 1821 | if (byteLength2 > 3) { 1822 | if (min === 0 || min === BigInt(0)) { 1823 | range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`; 1824 | } else { 1825 | range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`; 1826 | } 1827 | } else { 1828 | range = `>= ${min}${n} and <= ${max}${n}`; 1829 | } 1830 | throw new errors.ERR_OUT_OF_RANGE("value", range, value); 1831 | } 1832 | checkBounds(buf, offset, byteLength2); 1833 | } 1834 | function validateNumber(value, name) { 1835 | if (typeof value !== "number") { 1836 | throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value); 1837 | } 1838 | } 1839 | function boundsError(value, length, type) { 1840 | if (Math.floor(value) !== value) { 1841 | validateNumber(value, type); 1842 | throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value); 1843 | } 1844 | if (length < 0) { 1845 | throw new errors.ERR_BUFFER_OUT_OF_BOUNDS(); 1846 | } 1847 | throw new errors.ERR_OUT_OF_RANGE( 1848 | type || "offset", 1849 | `>= ${type ? 1 : 0} and <= ${length}`, 1850 | value 1851 | ); 1852 | } 1853 | var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; 1854 | function base64clean(str) { 1855 | str = str.split("=")[0]; 1856 | str = str.trim().replace(INVALID_BASE64_RE, ""); 1857 | if (str.length < 2) 1858 | return ""; 1859 | while (str.length % 4 !== 0) { 1860 | str = str + "="; 1861 | } 1862 | return str; 1863 | } 1864 | function utf8ToBytes(string, units) { 1865 | units = units || Infinity; 1866 | let codePoint; 1867 | const length = string.length; 1868 | let leadSurrogate = null; 1869 | const bytes = []; 1870 | for (let i = 0; i < length; ++i) { 1871 | codePoint = string.charCodeAt(i); 1872 | if (codePoint > 55295 && codePoint < 57344) { 1873 | if (!leadSurrogate) { 1874 | if (codePoint > 56319) { 1875 | if ((units -= 3) > -1) 1876 | bytes.push(239, 191, 189); 1877 | continue; 1878 | } else if (i + 1 === length) { 1879 | if ((units -= 3) > -1) 1880 | bytes.push(239, 191, 189); 1881 | continue; 1882 | } 1883 | leadSurrogate = codePoint; 1884 | continue; 1885 | } 1886 | if (codePoint < 56320) { 1887 | if ((units -= 3) > -1) 1888 | bytes.push(239, 191, 189); 1889 | leadSurrogate = codePoint; 1890 | continue; 1891 | } 1892 | codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; 1893 | } else if (leadSurrogate) { 1894 | if ((units -= 3) > -1) 1895 | bytes.push(239, 191, 189); 1896 | } 1897 | leadSurrogate = null; 1898 | if (codePoint < 128) { 1899 | if ((units -= 1) < 0) 1900 | break; 1901 | bytes.push(codePoint); 1902 | } else if (codePoint < 2048) { 1903 | if ((units -= 2) < 0) 1904 | break; 1905 | bytes.push( 1906 | codePoint >> 6 | 192, 1907 | codePoint & 63 | 128 1908 | ); 1909 | } else if (codePoint < 65536) { 1910 | if ((units -= 3) < 0) 1911 | break; 1912 | bytes.push( 1913 | codePoint >> 12 | 224, 1914 | codePoint >> 6 & 63 | 128, 1915 | codePoint & 63 | 128 1916 | ); 1917 | } else if (codePoint < 1114112) { 1918 | if ((units -= 4) < 0) 1919 | break; 1920 | bytes.push( 1921 | codePoint >> 18 | 240, 1922 | codePoint >> 12 & 63 | 128, 1923 | codePoint >> 6 & 63 | 128, 1924 | codePoint & 63 | 128 1925 | ); 1926 | } else { 1927 | throw new Error("Invalid code point"); 1928 | } 1929 | } 1930 | return bytes; 1931 | } 1932 | function asciiToBytes(str) { 1933 | const byteArray = []; 1934 | for (let i = 0; i < str.length; ++i) { 1935 | byteArray.push(str.charCodeAt(i) & 255); 1936 | } 1937 | return byteArray; 1938 | } 1939 | function utf16leToBytes(str, units) { 1940 | let c, hi, lo; 1941 | const byteArray = []; 1942 | for (let i = 0; i < str.length; ++i) { 1943 | if ((units -= 2) < 0) 1944 | break; 1945 | c = str.charCodeAt(i); 1946 | hi = c >> 8; 1947 | lo = c % 256; 1948 | byteArray.push(lo); 1949 | byteArray.push(hi); 1950 | } 1951 | return byteArray; 1952 | } 1953 | function base64ToBytes(str) { 1954 | return base64.toByteArray(base64clean(str)); 1955 | } 1956 | function blitBuffer(src, dst, offset, length) { 1957 | let i; 1958 | for (i = 0; i < length; ++i) { 1959 | if (i + offset >= dst.length || i >= src.length) 1960 | break; 1961 | dst[i + offset] = src[i]; 1962 | } 1963 | return i; 1964 | } 1965 | function isInstance(obj, type) { 1966 | return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; 1967 | } 1968 | function numberIsNaN(obj) { 1969 | return obj !== obj; 1970 | } 1971 | var hexSliceLookupTable = function() { 1972 | const alphabet = "0123456789abcdef"; 1973 | const table = new Array(256); 1974 | for (let i = 0; i < 16; ++i) { 1975 | const i16 = i * 16; 1976 | for (let j = 0; j < 16; ++j) { 1977 | table[i16 + j] = alphabet[i] + alphabet[j]; 1978 | } 1979 | } 1980 | return table; 1981 | }(); 1982 | function defineBigIntMethod(fn) { 1983 | return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn; 1984 | } 1985 | function BufferBigIntNotDefined() { 1986 | throw new Error("BigInt not supported"); 1987 | } 1988 | } 1989 | }); 1990 | 1991 | // src/index.ts 1992 | var import_buffer = __toESM(require_buffer(), 1); 1993 | 1994 | var ipProviderLink = "https://raw.githubusercontent.com/vfarid/cf-clean-ips/main/list.json"; 1995 | var addressList = [ 1996 | "discord.com", 1997 | "cloudflare.com", 1998 | "nginx.com", 1999 | "www.speedtest.com", 2000 | "laravel.com", 2001 | "chat.openai.com", 2002 | "auth0.openai.com", 2003 | "codepen.io", 2004 | "api.jquery.com" 2005 | ]; 2006 | var fpList = [ 2007 | "chrome", 2008 | "chrome", 2009 | "chrome", 2010 | "firefox", 2011 | "safari", 2012 | "edge", 2013 | "ios", 2014 | "android", 2015 | "random", 2016 | "random" 2017 | ]; 2018 | var alpnList = [ 2019 | "http/1.1", 2020 | "h2,http/1.1", 2021 | "h2,http/1.1" 2022 | ]; 2023 | var operators = []; 2024 | var cleanIPs = []; 2025 | var maxConfigs = MAX_CONFIGS; 2026 | var includeOriginalConfigs = INCLUDE_ORIGINAL; 2027 | var src_default = { 2028 | async fetch(request) { 2029 | const url = new URL(request.url); 2030 | const path = url.pathname.replace(/^\/|\/$/g, ""); 2031 | const parts = path.split("/"); 2032 | const type = parts[0].toLowerCase(); 2033 | if (type === "sub") { 2034 | if (parts[1] !== void 0) { 2035 | if (parts[1].includes(".")) { 2036 | cleanIPs = parts[1].toLowerCase().trim().split(",").map((ip2) => { 2037 | return { ip: ip2, operator: "IP" }; 2038 | }); 2039 | operators = ["IP"]; 2040 | } else { 2041 | try { 2042 | operators = parts[1].toUpperCase().trim().split(","); 2043 | cleanIPs = await fetch(ipProviderLink).then((r) => r.json()).then((j) => j.ipv4); 2044 | cleanIPs = cleanIPs.filter((el) => operators.includes(el.operator)); 2045 | } catch (e) { 2046 | } 2047 | } 2048 | } 2049 | if (url.searchParams.has("max")) { 2050 | maxConfigs = parseInt(url.searchParams.get("max")); 2051 | if (!maxConfigs) { 2052 | maxConfigs = MAX_CONFIGS; 2053 | } 2054 | } 2055 | if (url.searchParams.has("original")) { 2056 | const original = url.searchParams.get("original"); 2057 | includeOriginalConfigs = ["1", "true", "yes", "y"].includes(original.toLowerCase()); 2058 | } 2059 | if (includeOriginalConfigs) { 2060 | maxConfigs = Math.floor(maxConfigs / 2); 2061 | } 2062 | var configList = []; 2063 | var acceptableConfigList = []; 2064 | var finalConfigList = []; 2065 | var newConfigs; 2066 | for (const sub of configProviders) { 2067 | try { 2068 | newConfigs = []; 2069 | for (const link of sub.urls) { 2070 | newConfigs.push(await fetch(link).then((r) => r.text())); 2071 | if (sub.type === "b64") { 2072 | newConfigs = import_buffer.Buffer.from(newConfigs, "base64").toString("utf-8"); 2073 | } 2074 | } 2075 | newConfigs = newConfigs.join("\n").split("\n"); 2076 | acceptableConfigList.push({ 2077 | name: sub.name, 2078 | configs: newConfigs.filter((cnf) => cnf.match(/^(vmess|vless|trojan):\/\//i)) 2079 | }); 2080 | if (includeOriginalConfigs) { 2081 | configList.push({ 2082 | name: sub.name, 2083 | configs: newConfigs.filter((cnf) => cnf.match(/^(vmess|vless|trojan|ss|ssr):\/\//i)) 2084 | }); 2085 | } 2086 | } catch (e) { 2087 | } 2088 | } 2089 | var ipList = []; 2090 | if (!cleanIPs.length) { 2091 | operators = ["General"]; 2092 | cleanIPs = [{ ip: "", operator: "General" }]; 2093 | } 2094 | const configPerList = Math.ceil(maxConfigs / acceptableConfigList.length); 2095 | for (const operator of operators) { 2096 | var ipList = cleanIPs.filter((el) => el.operator == operator).slice(0, 5); 2097 | var ip = ipList[Math.floor(Math.random() * ipList.length)].ip; 2098 | for (const el of acceptableConfigList) { 2099 | finalConfigList = finalConfigList.concat( 2100 | getMultipleRandomElements( 2101 | el.configs.map(decodeConfig).map((cnf) => mixConfig(cnf, url, ip, operator, el.name)).filter((cnf) => !!cnf && cnf.id).map(encodeConfig).filter((cnf) => !!cnf), 2102 | configPerList 2103 | ) 2104 | ); 2105 | } 2106 | } 2107 | if (includeOriginalConfigs) { 2108 | for (const el of configList) { 2109 | finalConfigList = finalConfigList.concat( 2110 | getMultipleRandomElements( 2111 | el.configs.map(decodeConfig).map((cnf) => renameConfig(cnf, el.name)).filter((cnf) => !!cnf && cnf.id).map(encodeConfig).filter((cnf) => !!cnf), 2112 | configPerList 2113 | ) 2114 | ); 2115 | } 2116 | } 2117 | return new Response(import_buffer.Buffer.from(finalConfigList.join("\n"), "utf-8").toString("base64")); 2118 | } else if (path) { 2119 | var newUrl = new URL("https://" + url.pathname.replace(/^\/|\/$/g, "")); 2120 | return fetch(new Request(newUrl, request)); 2121 | } else { 2122 | return new Response(` 2123 | 2124 |

\u0647\u0645\u0647 \u0686\u06CC \u062F\u0631\u0633\u062A\u0647

2125 |

2126 |

2127 | \u0627\u06CC\u0646 \u0644\u06CC\u0646\u06A9 sub \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06A9\u062F \u0627\u067E\u0631\u0627\u062A\u0648\u0631 \u062F\u0631 \u0627\u067E v2ray \u062E\u0648\u062F \u06A9\u067E\u06CC \u06A9\u0646\u06CC\u062F. \u0628\u0631\u0627\u06CC \u0645\u062B\u0627\u0644 \u062F\u0631 \u0647\u0645\u0631\u0627\u0647 \u0627\u0648\u0644 \u0628\u0647 \u0634\u06A9\u0644 \u0632\u06CC\u0631 \u062E\u0648\u0627\u0647\u062F \u0628\u0648\u062F: 2128 |

2129 |

2130 | https://${url.hostname}/sub/mci 2131 |

2132 |

2133 | \u0648 \u06CC\u0627 \u0647\u0645\u06CC\u0646 \u0644\u06CC\u0646\u06A9 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0622\u06CC\u200C\u067E\u06CC \u062A\u0645\u06CC\u0632 \u062F\u0631 \u0627\u067E \u062E\u0648\u062F \u0627\u0636\u0627\u0641\u0647 \u06A9\u0646\u06CC\u062F: 2134 |

2135 |

2136 | https://${url.hostname}/sub/1.2.3.4 2137 |

2138 |

2139 | \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0686\u0646\u062F \u0622\u06CC\u200C\u067E\u06CC \u062A\u0645\u06CC\u0632 \u0631\u0627 \u0628\u0627 \u06A9\u0627\u0645\u0627 \u062C\u062F\u0627 \u06A9\u0646\u06CC\u062F. \u062F\u0631 \u0627\u06CC\u0646 \u0635\u0648\u0631\u062A \u0628\u0631\u0627\u06CC \u0647\u0631 \u0622\u06CC\u200C\u067E\u06CC \u062A\u0645\u06CC\u0632 \u0628\u0647 \u062A\u0639\u062F\u0627\u062F \u0642\u062F\u06CC\u062F \u0634\u062F\u0647\u060C \u06A9\u0627\u0646\u0641\u06CC\u06A9 \u062A\u0631\u06A9\u06CC\u0628 \u0634\u062F\u0647 \u0628\u0627 \u0648\u0631\u06A9\u0631 \u062A\u062D\u0648\u06CC\u0644 \u0645\u06CC \u062F\u0647\u062F: 2140 |

2141 |

2142 | https://${url.hostname}/sub/1.2.3.4,9.8.7.6 2143 |

2144 |

2145 | \u062F\u0642\u06CC\u0642\u0627 \u0628\u0627 \u0647\u0645\u06CC\u0646 \u0645\u062F\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u062F\u0627\u0645\u06CC\u0646 \u0622\u06CC\u200C\u067E\u06CC \u062A\u0645\u06CC\u0632 \u0646\u06CC\u0632 \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u06A9\u0646\u06CC\u062F: 2146 |

2147 |

2148 | https://${url.hostname}/sub/mci.ircf.space 2149 |

2150 |

2151 | \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0627\u0632 \u0686\u0646\u062F \u0633\u0627\u0628\u062F\u0627\u0645\u0646\u06CC\u0646 \u0622\u06CC\u0621\u06CC \u062A\u0645\u06CC\u0632 \u0646\u06CC\u0632 \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u06A9\u0646\u06CC\u062F: 2152 |

2153 |

2154 | https://${url.hostname}/sub/mci.ircf.space,my.domain.me 2155 |

2156 |

2157 | \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627 \u0645\u062A\u063A\u06CC\u0631 max \u062A\u0639\u062F\u0627\u062F \u06A9\u0627\u0646\u0641\u06CC\u06AF \u0631\u0627 \u0645\u0634\u062E\u0635 \u06A9\u0646\u06CC\u062F: 2158 |

2159 |

2160 | https://${url.hostname}/sub/1.2.3.4?max=200 2161 |

2162 |

2163 | \u0647\u0645\u0686\u0646\u06CC\u0646 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627 \u0645\u062A\u063A\u06CC\u0631 original \u0628\u0627 \u0639\u062F\u062F 0 \u06CC\u0627 1 \u0648 \u06CC\u0627 \u0628\u0627 yes/no \u0645\u0634\u062E\u0635 \u06A9\u0646\u06CC\u062F \u06A9\u0647 \u06A9\u0627\u0646\u0641\u06CC\u06AF\u200C\u0647\u0627\u06CC \u0627\u0635\u0644\u06CC (\u062A\u0631\u06A9\u06CC\u0628 \u0646\u0634\u062F\u0647 \u0628\u0627 \u0648\u0631\u06A9\u0631) \u0647\u0645 \u062F\u0631 \u062E\u0631\u0648\u062C\u06CC \u0622\u0648\u0631\u062F\u0647 \u0634\u0648\u0646\u062F \u06CC\u0627 \u0646\u0647: 2164 |

2165 |

2166 | https://${url.hostname}/sub/1.2.3.4?max=200&original=yes 2167 |

2168 |

2169 | https://${url.hostname}/sub/1.2.3.4?max=200&original=0 2170 |

2171 | `, { 2172 | headers: { 2173 | "content-type": "text/html;charset=UTF-8" 2174 | } 2175 | }); 2176 | } 2177 | } 2178 | }; 2179 | function encodeConfig(conf) { 2180 | var configStr = null; 2181 | try { 2182 | if (conf.protocol === "vmess") { 2183 | delete conf.protocol; 2184 | configStr = "vmess://" + import_buffer.Buffer.from(JSON.stringify(conf), "utf-8").toString("base64"); 2185 | } else if (["vless", "trojan"].includes(conf?.protocol)) { 2186 | configStr = `${conf.protocol}://${conf.id}@${conf.add}:${conf.port}?security=${conf.tls}&type=${conf.type}&path=${encodeURIComponent(conf.path)}&host=${encodeURIComponent(conf.host)}&tls=${conf.tls}&sni=${conf.sni}#${encodeURIComponent(conf.ps)}`; 2187 | } 2188 | } catch (e) { 2189 | } 2190 | return configStr; 2191 | } 2192 | function decodeConfig(configStr) { 2193 | var match = null; 2194 | var conf = null; 2195 | if (configStr.startsWith("vmess://")) { 2196 | try { 2197 | conf = JSON.parse(import_buffer.Buffer.from(configStr.substring(8), "base64").toString("utf-8")); 2198 | conf.protocol = "vmess"; 2199 | } catch (e) { 2200 | } 2201 | } else if (match = configStr.match(/^(?trojan|vless):\/\/(?.*)@(?.*):(?\d+)\??(?.*)#(?.*)$/)) { 2202 | try { 2203 | const optionsArr = match.groups.options.split("&") ?? []; 2204 | const optionsObj = optionsArr.reduce((obj, option) => { 2205 | const [key, value] = option.split("="); 2206 | obj[key] = decodeURIComponent(value); 2207 | return obj; 2208 | }, {}); 2209 | conf = { 2210 | protocol: match.groups.protocol, 2211 | id: match.groups.id, 2212 | add: match.groups?.add, 2213 | port: match.groups.port ?? 443, 2214 | ps: match.groups?.ps, 2215 | type: optionsObj.type ?? "tcp", 2216 | host: optionsObj?.host, 2217 | path: optionsObj?.path, 2218 | tls: optionsObj.security ?? "none", 2219 | sni: optionsObj?.sni, 2220 | alpn: optionsObj?.alpn 2221 | }; 2222 | } catch (e) { 2223 | } 2224 | } 2225 | return conf; 2226 | } 2227 | function mixConfig(conf, url, ip, operator, provider) { 2228 | try { 2229 | if (conf.tls != "tls") { 2230 | return {}; 2231 | } 2232 | var addr = conf.sni; 2233 | if (!addr) { 2234 | if (conf.host && !isIp(conf.host)) { 2235 | addr = conf.host; 2236 | } else if (conf.add && !isIp(conf.add)) { 2237 | addr = conf.add; 2238 | } 2239 | } 2240 | if (!addr) { 2241 | return {}; 2242 | } 2243 | if (addr.endsWith(".workers.dev")) { 2244 | const part1 = conf.path.split("/").pop(); 2245 | const part2 = conf.path.substring(0, conf.path.length - part1.length - 1); 2246 | var path; 2247 | if (part1.includes(":")) { 2248 | addr = part1.replace(/^\//g, "").split(":"); 2249 | conf.port = addr[1]; 2250 | addr = addr[0]; 2251 | path = "/" + part2.replace(/^\//g, ""); 2252 | } else if (part2.includes(":")) { 2253 | addr = part2.replace(/^\//g, "").split(":"); 2254 | conf.port = addr[1]; 2255 | addr = addr[0]; 2256 | path = "/" + part1.replace(/^\//g, ""); 2257 | } else if (part1.includes(".")) { 2258 | addr = part1.replace(/^\//g, ""); 2259 | conf.port = 443; 2260 | path = "/" + part2.replace(/^\//g, ""); 2261 | } else { 2262 | addr = part2.replace(/^\//g, ""); 2263 | conf.port = 443; 2264 | path = "/" + part1.replace(/^\//g, ""); 2265 | } 2266 | conf.path = path; 2267 | } 2268 | conf.ps = conf?.ps ? conf.ps : conf.name; 2269 | if (provider) { 2270 | conf.ps = provider + "-" + conf.ps; 2271 | } 2272 | conf.ps = conf.ps + "-worker-" + operator.toLocaleLowerCase(); 2273 | conf.name = conf.ps; 2274 | conf.host = url.hostname; 2275 | conf.sni = url.hostname; 2276 | if (ip) { 2277 | conf.add = ip; 2278 | } else { 2279 | conf.add = addressList[Math.floor(Math.random() * addressList.length)]; 2280 | } 2281 | if (!conf?.host) { 2282 | conf.host = addr; 2283 | } 2284 | conf.path = "/" + addr + ":" + conf.port + (conf?.path ? "/" + conf.path.replace(/^\//g, "") : ""); 2285 | conf.fp = fpList[Math.floor(Math.random() * fpList.length)]; 2286 | conf.alpn = alpnList[Math.floor(Math.random() * alpnList.length)]; 2287 | conf.port = 443; 2288 | return conf; 2289 | } catch (e) { 2290 | return {}; 2291 | } 2292 | } 2293 | function renameConfig(conf, provider) { 2294 | try { 2295 | conf.ps = conf?.ps ? conf.ps : conf.name; 2296 | conf.ps = provider + "-" + conf.ps; 2297 | return conf; 2298 | } catch (e) { 2299 | return {}; 2300 | } 2301 | } 2302 | function getMultipleRandomElements(arr, num) { 2303 | var shuffled = [...arr].sort(() => 0.5 - Math.random()); 2304 | return shuffled.slice(0, num); 2305 | } 2306 | function isIp(str) { 2307 | try { 2308 | if (str == "" || str == void 0) 2309 | return false; 2310 | if (!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])$/.test(str)) { 2311 | return false; 2312 | } 2313 | var ls = str.split("."); 2314 | if (ls == null || ls.length != 4 || ls[3] == "0" || parseInt(ls[3]) === 0) { 2315 | return false; 2316 | } 2317 | return true; 2318 | } catch (e) { 2319 | } 2320 | return false; 2321 | } 2322 | export { 2323 | src_default as default 2324 | }; 2325 | //# sourceMappingURL=index.js.map 2326 | -------------------------------------------------------------------------------- /xx.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} 6 | /*# sourceMappingURL=bootstrap.min.css.map */ 7 | --------------------------------------------------------------------------------