diff --git a/src/extractor/YouTube.test.ts b/src/extractor/YouTube.test.ts new file mode 100644 index 0000000..b1a0c6a --- /dev/null +++ b/src/extractor/YouTube.test.ts @@ -0,0 +1,21 @@ +import winston from 'winston'; +import { createTestContext } from '../test'; +import { CountryCode } from '../types'; +import { FetcherMock } from '../utils'; +import { ExtractorRegistry } from './ExtractorRegistry'; +import { YouTube } from './YouTube'; + +const logger = winston.createLogger({ transports: [new winston.transports.Console({ level: 'nope' })] }); +const extractorRegistry = new ExtractorRegistry(logger, [new YouTube(new FetcherMock(`${__dirname}/__fixtures__/YouTube`))]); + +const ctx = createTestContext(); + +describe('YouTube', () => { + test('Solaris', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://www.youtube.com/watch?v=Z8ZhQPaw4rE'), CountryCode.en)).toMatchSnapshot(); + }); + + test('unsupported format', async () => { + expect(await extractorRegistry.handle(ctx, new URL('https://youtu.be/Z8ZhQPaw4rE?feature=shared'), CountryCode.en)).toMatchSnapshot(); + }); +}); diff --git a/src/extractor/YouTube.ts b/src/extractor/YouTube.ts new file mode 100644 index 0000000..48e0cb0 --- /dev/null +++ b/src/extractor/YouTube.ts @@ -0,0 +1,42 @@ +import { Context, CountryCode, Format, UrlResult } from '../types'; +import { Fetcher } from '../utils'; +import { Extractor } from './Extractor'; + +export class YouTube extends Extractor { + public readonly id = 'youtube'; + + public readonly label = 'YouTube'; + + private readonly fetcher: Fetcher; + + public constructor(fetcher: Fetcher) { + super(); + + this.fetcher = fetcher; + } + + public supports(_ctx: Context, url: URL): boolean { + return null !== url.host.match(/youtube/) && url.searchParams.has('v'); + } + + protected async extractInternal(ctx: Context, url: URL, countryCode: CountryCode): Promise { + const html = await this.fetcher.text(ctx, url); + + const titleMatch = html.match(/"title":{"runs":\[{"text":"(.*?)"/) as string[]; + + return [ + { + url, + format: Format.unknown, + ytId: url.searchParams.get('v') as string, + label: this.label, + sourceId: `${this.id}_${countryCode}`, + ttl: this.ttl, + meta: { + countryCodes: [countryCode], + title: titleMatch[1] as string, + }, + }, + ]; + }; +} diff --git a/src/extractor/__fixtures__/YouTube/https:www.youtube.comwatchvZ8ZhQPaw4rE b/src/extractor/__fixtures__/YouTube/https:www.youtube.comwatchvZ8ZhQPaw4rE new file mode 100644 index 0000000..4b58b4e --- /dev/null +++ b/src/extractor/__fixtures__/YouTube/https:www.youtube.comwatchvZ8ZhQPaw4rE @@ -0,0 +1,84 @@ + - YouTube
InfoPresseUrheberrechtKontaktCreatorWerbenEntwicklerImpressumVerträge hier kündigenNutzungsbedingungenDatenschutzRichtlinien & SicherheitWie funktioniert YouTube?Neue Funktionen testen
\ No newline at end of file diff --git a/src/extractor/__snapshots__/YouTube.test.ts.snap b/src/extractor/__snapshots__/YouTube.test.ts.snap new file mode 100644 index 0000000..f2201fd --- /dev/null +++ b/src/extractor/__snapshots__/YouTube.test.ts.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`YouTube Solaris 1`] = ` +[ + { + "format": "unknown", + "label": "YouTube", + "meta": { + "countryCodes": [ + "en", + ], + "height": undefined, + "title": "Solaris | SCIENCE FICTION | FULL MOVIE | directed by Tarkovsky", + }, + "sourceId": "youtube_en", + "ttl": 900000, + "url": "https://www.youtube.com/watch?v=Z8ZhQPaw4rE", + "ytId": "Z8ZhQPaw4rE", + }, +] +`; + +exports[`YouTube unsupported format 1`] = `[]`; diff --git a/src/extractor/index.ts b/src/extractor/index.ts index a1f28c0..630f66f 100644 --- a/src/extractor/index.ts +++ b/src/extractor/index.ts @@ -15,6 +15,7 @@ import { Uqload } from './Uqload'; import { VidSrc } from './VidSrc'; import { VixSrc } from './VixSrc'; import { XPrime } from './XPrime'; +import { YouTube } from './YouTube'; export * from './Extractor'; export * from './ExtractorRegistry'; @@ -34,5 +35,6 @@ export const createExtractors = (fetcher: Fetcher): Extractor[] => [ new VidSrc(fetcher, ['in', 'pm', 'net', 'xyz', 'io', 'vc']), // https://vidsrc.domains/ new VixSrc(fetcher), new XPrime(fetcher), + new YouTube(fetcher), new ExternalUrl(fetcher), // fallback extractor which must come last ]; diff --git a/src/types.ts b/src/types.ts index 968b95a..92f046e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -56,6 +56,7 @@ export interface UrlResult { url: URL; format: Format; isExternal?: boolean; + ytId?: string; error?: unknown; label: string; sourceId: string; diff --git a/src/utils/StreamResolver.test.ts b/src/utils/StreamResolver.test.ts index c6b0a5b..09052cc 100644 --- a/src/utils/StreamResolver.test.ts +++ b/src/utils/StreamResolver.test.ts @@ -5,6 +5,7 @@ import { createExtractors, Extractor, ExtractorRegistry } from '../extractor'; import { Source, SourceResult } from '../source'; import { MeineCloud } from '../source/MeineCloud'; import { MostraGuarda } from '../source/MostraGuarda'; +import { PrimeWire } from '../source/PrimeWire'; import { createTestContext } from '../test'; import { BlockedReason, CountryCode, Format, UrlResult } from '../types'; import { FetcherMock } from './FetcherMock'; @@ -17,6 +18,7 @@ const ctx = createTestContext({ de: 'on', it: 'on' }); const meineCloud = new MeineCloud(fetcher); const mostraGuarda = new MostraGuarda(fetcher); +const primeWire = new PrimeWire(fetcher); describe('resolve', () => { test('returns info as stream if no sources were configured', async () => { @@ -68,6 +70,14 @@ describe('resolve', () => { expect(streamsWithExternalUrls.streams).toMatchSnapshot(); }); + test('returns ytId instead of url for YouTube video', async () => { + const streamResolver = new StreamResolver(logger, new ExtractorRegistry(logger, createExtractors(fetcher))); + + const streams = await streamResolver.resolve(ctx, [primeWire], 'movie', new ImdbId('tt0069293', undefined, undefined)); + expect(streams.ttl).not.toBeUndefined(); + expect(streams.streams).toMatchSnapshot(); + }); + test('adds error info', async () => { class MockSource implements Source { public readonly id = 'mocksource'; @@ -248,7 +258,7 @@ describe('resolve', () => { }); test('ignores not found errors', async () => { - const mockSource: Source = { + const mockHandler: Source = { id: 'mocksource', label: 'MockSource', contentTypes: ['movie'], @@ -258,7 +268,7 @@ describe('resolve', () => { }; const streamResolver = new StreamResolver(logger, new ExtractorRegistry(logger, createExtractors(fetcher))); - const streams = await streamResolver.resolve(ctx, [mockSource], 'movie', new ImdbId('tt12345678', undefined, undefined)); + const streams = await streamResolver.resolve(ctx, [mockHandler], 'movie', new ImdbId('tt12345678', undefined, undefined)); expect(streams).toMatchSnapshot(); }); diff --git a/src/utils/StreamResolver.ts b/src/utils/StreamResolver.ts index 016b2f2..8d64e51 100644 --- a/src/utils/StreamResolver.ts +++ b/src/utils/StreamResolver.ts @@ -135,7 +135,11 @@ export class StreamResolver { return Math.min(...urlResults.map(urlResult => urlResult.ttl as number)); }; - private buildUrl(urlResult: UrlResult): { externalUrl: string } | { url: string } { + private buildUrl(urlResult: UrlResult): { externalUrl: string } | { url: string } | { ytId: string } { + if (urlResult.ytId) { + return { ytId: urlResult.ytId }; + } + if (!urlResult.isExternal) { return { url: urlResult.url.href }; } diff --git a/src/utils/__fixtures__/StreamResolver/http:dood.toe1srct94x5yfz b/src/utils/__fixtures__/StreamResolver/http:dood.toe1srct94x5yfz new file mode 100644 index 0000000..eea4e4e --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/http:dood.toe1srct94x5yfz @@ -0,0 +1 @@ + Solaris 1972 PROPER 1080p BluRay x264-SADPANDA - ENG SUBS - tt0069293 - DoodStream.com
\ No newline at end of file diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-1b2798be307699e7fe8f91c4f4e3d391 b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-1b2798be307699e7fe8f91c4f4e3d391 new file mode 100644 index 0000000..81a2808 --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-1b2798be307699e7fe8f91c4f4e3d391 @@ -0,0 +1,5 @@ +{ + "link": "https://mixdrop.ag/f/gn1d6nkjiwdp8x4", + "host_id": 29, + "host": "mixdrop.ag" +} \ No newline at end of file diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-2aa3f14f9d8fa7a629fdb5a19273ff36 b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-2aa3f14f9d8fa7a629fdb5a19273ff36 new file mode 100644 index 0000000..df7d7bf --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-2aa3f14f9d8fa7a629fdb5a19273ff36 @@ -0,0 +1,5 @@ +{ + "link": "https://www.youtube.com/watch?v=Z8ZhQPaw4rE", + "host_id": 19, + "host": "youtube.com" +} \ No newline at end of file diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-49cd5151dbf0ce401486d38d337262d4 b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-49cd5151dbf0ce401486d38d337262d4 new file mode 100644 index 0000000..9e1128a --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-49cd5151dbf0ce401486d38d337262d4 @@ -0,0 +1,5 @@ +{ + "link": "https://dood.watch/d/1srct94x5yfz", + "host_id": 42, + "host": "dood.watch" +} \ No newline at end of file diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-cd3d483e90507fe23e7eb380c65ca19c b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-cd3d483e90507fe23e7eb380c65ca19c new file mode 100644 index 0000000..ac11031 --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-cd3d483e90507fe23e7eb380c65ca19c @@ -0,0 +1,5 @@ +{ + "link": "https://www.dailymotion.com/video/x4tjxgv", + "host_id": 40, + "host": "dailymotion.com" +} \ No newline at end of file diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-dda29c6cbb633e9746ed5c5a1ca1061e b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-dda29c6cbb633e9746ed5c5a1ca1061e new file mode 100644 index 0000000..1ee72d6 --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tf-dda29c6cbb633e9746ed5c5a1ca1061e @@ -0,0 +1,5 @@ +{ + "link": "https://mixdrop.ag/f/0vo8vlkqfpvopx", + "host_id": 29, + "host": "mixdrop.ag" +} \ No newline at end of file diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tffilterstt0069293anddsd53eb5c07a b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tffilterstt0069293anddsd53eb5c07a new file mode 100644 index 0000000..4c524d4 --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tffilterstt0069293anddsd53eb5c07a @@ -0,0 +1,631 @@ + + + + + + + + + +Movies and TV Shows matching "tt0069293" | PrimeWire + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+
+ + + + + +
Try our new domain, PrimeWire.mov
+
+ + + +
+ +

+Movies and TV Shows matching "tt0069293" +

+
+
+ + +
+ +
+ +
+Reset +
+ +
+More +
+Search Term: +Year: + + + to + + + +Rating: + + + to + + + +Cast: +Crew: +Company: +Country: +
+
+ +
+Direction +
+ +
+
+ + +
+Sort +
+ +
+
+ + +
+Genre +
+Mode: + +
+
+ +
+Streaming +
+ +
+
+ +
+Type +
+ +
+
+ +
+
+
+ + +
+ + Watch Solaris +

Solaris
(1972)

+
+ +
+
+
    +
  • Current rating.
  • +
  • +
+
+
+ +
+ info +
+ +
+ + +
+
+
+ + + + + + +
+
+ + +
+ + +
+ + + + + + +
+ +
+ + + +
+ + + + + diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tfjsapp-21ed8068b7ca664627b94721e1176d90.jsvsnd b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tfjsapp-21ed8068b7ca664627b94721e1176d90.jsvsnd new file mode 100644 index 0000000..e3092c5 --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tfjsapp-21ed8068b7ca664627b94721e1176d90.jsvsnd @@ -0,0 +1,2 @@ +/*! For license information please see app.js.LICENSE.txt */ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}([function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},u=o.push,c=o.indexOf,f={},d=f.toString,p=f.hasOwnProperty,h=p.toString,m=h.call(Object),v={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function _(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in w)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function k(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[d.call(e)]||"object":typeof e}var x=/HTML$/i,E=function(e,t){return new E.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=k(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}E.fn=E.prototype={jquery:"3.7.0",constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+P+")"+P+"*"),U=new RegExp(P+"|>"),q=new RegExp(M),B=new RegExp("^"+D+"$"),F={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Y=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Q=function(){le()},J=de((function(e){return!0===e.disabled&&C(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=s.call(L.childNodes),L.childNodes),o[L.childNodes.length].nodeType}catch(e){m={apply:function(e,t){R.apply(e,s.call(t))},call:function(e){R.apply(e,s.call(arguments,1))}}}function Z(e,t,n,r){var i,o,a,s,u,c,p,h=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!r&&(le(t),t=t||l,f)){if(11!==y&&(u=X.exec(e)))if(i=u[1]){if(9===y){if(!(a=t.getElementById(i)))return n;if(a.id===i)return m.call(n,a),n}else if(h&&(a=h.getElementById(i))&&Z.contains(t,a)&&a.id===i)return m.call(n,a),n}else{if(u[2])return m.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&t.getElementsByClassName)return m.apply(n,t.getElementsByClassName(i)),n}if(!(x[e+" "]||d&&d.test(e))){if(p=e,h=t,1===y&&(U.test(e)||z.test(e))){for((h=G.test(e)&&se(t.parentNode)||t)==t&&v.scope||((s=t.getAttribute("id"))?s=E.escapeSelector(s):t.setAttribute("id",s=g)),o=(c=ce(e)).length;o--;)c[o]=(s?"#"+s:":scope")+" "+fe(c[o]);p=c.join(",")}try{return m.apply(n,h.querySelectorAll(p)),n}catch(t){x(e,!0)}finally{s===g&&t.removeAttribute("id")}}}return ye(e.replace(j,"$1"),t,n,r)}function ee(){var e=[];return function n(r,i){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=i}}function te(e){return e[g]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return C(t,"input")&&t.type===e}}function ie(e){return function(t){return(C(t,"input")||C(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&J(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,r=e?e.ownerDocument||e:L;return r!=l&&9===r.nodeType&&r.documentElement?(u=(l=r).documentElement,f=!E.isXMLDoc(l),h=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,L!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",Q),v.getById=ne((function(e){return u.appendChild(e).id=E.expando,!l.getElementsByName||!l.getElementsByName(E.expando).length})),v.disconnectedMatch=ne((function(e){return h.call(e,"*")})),v.scope=ne((function(){return l.querySelectorAll(":scope")})),v.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),v.getById?(t.filter.ID=function(e){var t=e.replace(K,Y);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(K,Y);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},d=[],ne((function(e){var t;u.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+P+"*(?:value|"+N+")"),e.querySelectorAll("[id~="+g+"-]").length||d.push("~="),e.querySelectorAll("a#"+g+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),u.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")")})),v.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),S=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==L&&Z.contains(L,e)?-1:t===l||t.ownerDocument==L&&Z.contains(L,t)?1:i?c.call(i,e)-c.call(i,t):0:4&n?-1:1)},l):l}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(le(e),f&&!x[t+" "]&&(!d||!d.test(t)))try{var n=h.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){x(t,!0)}return Z(t,l,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),E.contains(e,t)},Z.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var r=t.attrHandle[n.toLowerCase()],i=r&&p.call(t.attrHandle,n.toLowerCase())?r(e,n,!f):void 0;return void 0!==i?i:e.getAttribute(n)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},E.uniqueSort=function(e){var t,n=[],r=0,o=0;if(a=!v.sortStable,i=!v.sortStable&&s.call(e,0),O.call(e,S),a){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)A.call(e,n[r],1)}return i=null,e},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(s.apply(this)))},(t=E.expr={cacheLength:50,createPseudo:te,match:F,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,Y),e[3]=(e[3]||e[4]||e[5]||"").replace(K,Y),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Z.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return F.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=ce(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(K,Y).toLowerCase();return"*"===e?function(){return!0}:function(e){return C(e,t)}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&w(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Z.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,f,d,p,h=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s,w=!1;if(m){if(o){for(;h;){for(f=t;f=f[h];)if(s?C(f,v):1===f.nodeType)return!1;p=h="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&b){for(w=(d=(u=(c=m[g]||(m[g]={}))[e]||[])[0]===y&&u[1])&&u[2],f=d&&m.childNodes[d];f=++d&&f&&f[h]||(w=d=0)||p.pop();)if(1===f.nodeType&&++w&&f===t){c[e]=[y,d,w];break}}else if(b&&(w=d=(u=(c=t[g]||(t[g]={}))[e]||[])[0]===y&&u[1]),!1===w)for(;(f=++d&&f&&f[h]||(w=d=0)||p.pop())&&(!(s?C(f,v):1===f.nodeType)||!++w||(b&&((c=f[g]||(f[g]={}))[e]=[y,w]),f!==t)););return(w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return i[g]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,o=i(e,n),a=o.length;a--;)e[r=c.call(e,o[a])]=!(t[r]=o[a])})):function(e){return i(e,0,r)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=ge(e.replace(j,"$1"));return r[g]?te((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(K,Y),function(t){return(t.textContent||E.text(t)).indexOf(e)>-1}})),lang:te((function(e){return B.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(K,Y).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===u},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return C(e,"input")&&!!e.checked||C(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){return C(e,"input")&&"button"===e.type||C(e,"button")},text:function(e){var t;return C(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:ae((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function he(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s-1&&(o[u]=!(a[u]=d))}}else p=he(p===a?p.splice(g,p.length):p),i?i(null,a,p,l):m.apply(a,p)}))}function ve(e){for(var n,i,o,a=e.length,s=t.relative[e[0].type],l=s||t.relative[" "],u=s?1:0,f=de((function(e){return e===n}),l,!0),d=de((function(e){return c.call(n,e)>-1}),l,!0),p=[function(e,t,i){var o=!s&&(i||t!=r)||((n=t).nodeType?f(e,t,i):d(e,t,i));return n=null,o}];u1&&pe(p),u>1&&fe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(j,"$1"),i,u0,o=e.length>0,a=function(a,s,u,c,d){var p,h,v,g=0,b="0",w=a&&[],_=[],k=r,x=a||o&&t.find.TAG("*",d),S=y+=null==k?1:Math.random()||.1,C=x.length;for(d&&(r=s==l||s||d);b!==C&&null!=(p=x[b]);b++){if(o&&p){for(h=0,s||p.ownerDocument==l||(le(p),u=!f);v=e[h++];)if(v(p,s||l,u)){m.call(c,p);break}d&&(y=S)}i&&((p=!v&&p)&&g--,a&&w.push(p))}if(g+=b,i&&b!==g){for(h=0;v=n[h++];)v(w,_,s,u);if(a){if(g>0)for(;b--;)w[b]||_[b]||(_[b]=T.call(c));_=he(_)}m.apply(c,_),d&&!a&&_.length>0&&g+n.length>1&&E.uniqueSort(c)}return d&&(y=S,r=k),w};return i?te(a):a}(a,o))).selector=e}return s}function ye(e,n,r,i){var o,a,s,l,u,c="function"==typeof e&&e,d=!i&&ce(e=c.selector||e);if(r=r||[],1===d.length){if((a=d[0]=d[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&f&&t.relative[a[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(K,Y),n)||[])[0]))return r;c&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(o=F.needsContext.test(e)?0:a.length;o--&&(s=a[o],!t.relative[l=s.type]);)if((u=t.find[l])&&(i=u(s.matches[0].replace(K,Y),G.test(a[0].type)&&se(n.parentNode)||n))){if(a.splice(o,1),!(e=i.length&&fe(a)))return m.apply(r,i),r;break}}return(c||ge(e,d))(i,n,!f,r,!n||G.test(e)&&se(n.parentNode)||n),r}ue.prototype=t.filters=t.pseudos,t.setFilters=new ue,v.sortStable=g.split("").sort(S).join("")===g,le(),v.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),E.find=Z,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,Z.compile=ge,Z.select=ye,Z.setDocument=le,Z.escape=E.escapeSelector,Z.getText=E.text,Z.isXML=E.isXMLDoc,Z.selectors=E.expr,Z.support=E.support,Z.uniqueSort=E.uniqueSort}();var I=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},M=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},H=E.expr.match.needsContext,$=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(e,t,n){return g(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?E.grep(e,(function(e){return c.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(z(this,e||[],!1))},not:function(e){return this.pushStack(z(this,e||[],!0))},is:function(e){return!!z(this,"string"==typeof e&&H.test(e)?E(e):e||[],!1).length}});var U,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||U,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),$.test(r[1])&&E.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,U=E(b);var B=/^(?:parents|prev(?:Until|All))/,F={children:!0,contents:!0,next:!0,prev:!0};function W(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(E(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,n){return I(e,"parentNode",n)},next:function(e){return W(e,"nextSibling")},prev:function(e){return W(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,n){return I(e,"nextSibling",n)},prevUntil:function(e,t,n){return I(e,"previousSibling",n)},siblings:function(e){return M((e.parentNode||{}).firstChild,e)},children:function(e){return M(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(C(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(F[e]||E.uniqueSort(i),B.test(e)&&i.reverse()),this.pushStack(i)}}));var V=/[^\x20\t\r\n\f]+/g;function X(e){return e}function G(e){throw e}function K(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match(V)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?E.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(e=o&&(r!==G&&(s=void 0,l=[n]),t.rejectWith(s,l))}};e?c():(E.Deferred.getErrorHook?c.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(c.error=E.Deferred.getStackHook()),n.setTimeout(c))}}return E.Deferred((function(n){t[0][3].add(a(0,n,g(i)?i:X,n.notifyWith)),t[1][3].add(a(0,n,g(e)?e:X)),t[2][3].add(a(0,n,g(r)?r:G))})).promise()},promise:function(e){return null!=e?E.extend(e,i):i}},o={};return E.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=E.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(K(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)K(i[n],a(n),o.reject);return o.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Y.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){n.setTimeout((function(){throw e}))};var Q=E.Deferred();function J(){b.removeEventListener("DOMContentLoaded",J),n.removeEventListener("load",J),E.ready()}E.fn.ready=function(e){return Q.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||Q.resolveWith(b,[E]))}}),E.ready.then=Q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(E.ready):(b.addEventListener("DOMContentLoaded",J),n.addEventListener("load",J));var Z=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===k(n))for(s in i=!0,n)Z(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(E(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each((function(){se.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ae.get(e,t),n&&(!r||Array.isArray(n)?r=ae.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){E.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:E.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;ke=b.createDocumentFragment().appendChild(b.createElement("div")),(xe=b.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),ke.appendChild(xe),v.checkClone=ke.cloneNode(!0).cloneNode(!0).lastChild.checked,ke.innerHTML="",v.noCloneChecked=!!ke.cloneNode(!0).lastChild.defaultValue,ke.innerHTML="",v.option=!!ke.lastChild;var Te={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Oe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t)?E.merge([e],n):n}function Ae(e,t){for(var n=0,r=e.length;n",""]);var Pe=/<|&#?\w+;/;function je(e,t,n,r,i){for(var o,a,s,l,u,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p-1)i&&i.push(o);else if(u=me(o),a=Oe(f.appendChild(o),"script"),u&&Ae(a),n)for(c=0;o=a[c++];)Ce.test(o.type||"")&&n.push(o);return f}var Ne=/^([^.]*)(?:\.(.+)|)/;function De(){return!0}function Le(){return!1}function Re(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Re(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Le;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each((function(){E.event.add(this,t,i,r,n)}))}function Ie(e,t,n){n?(ae.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),ae.set(this,t,r),this[t](),n=ae.get(this,t),ae.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ae.set(this,t,E.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=De)}})):void 0===ae.get(e,t)&&E.event.add(e,t,De)}E.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,v=ae.get(e);if(ie(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(he,i),n.guid||(n.guid=E.guid++),(l=v.events)||(l=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(V)||[""]).length;u--;)p=m=(s=Ne.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=E.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=E.event.special[p]||{},c=E.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),E.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,d,p,h,m,v=ae.hasData(e)&&ae.get(e);if(v&&(l=v.events)){for(u=(t=(t||"").match(V)||[""]).length;u--;)if(p=m=(s=Ne.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=E.event.special[p]||{},d=l[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,p,v.handle),delete l[p])}else for(p in l)E.event.remove(e,p+t[u],n,r,!0);E.isEmptyObject(l)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=E.event.fix(e),u=(ae.get(this,"events")||Object.create(null))[l.type]||[],c=E.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:E.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\s*$/g;function ze(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Ue(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(ae.hasData(e)&&(s=ae.get(e).events))for(i in ae.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof h&&!v.checkClone&&He.test(h))return e.each((function(i){var o=e.eq(i);m&&(t[0]=h.call(this,i,o.html())),We(o,t,n,r)}));if(d&&(o=(i=je(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=E.map(Oe(i,"script"),Ue)).length;f0&&Ae(a,!l&&Oe(e,"script")),s},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(ie(n)){if(t=n[ae.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[ae.expando]=void 0}n[se.expando]&&(n[se.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Ve(this,e,!0)},remove:function(e){return Ve(this,e)},text:function(e){return Z(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return We(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ze(this,e).appendChild(e)}))},prepend:function(){return We(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ze(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(Oe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return Z(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Me.test(e)&&!Te[(Se.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l+u}function ut(e,t,n){var r=Ke(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=Je(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Xe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&C(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+lt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ct(e,t,n,r,i){return new ct.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=re(t),l=Ge.test(t),u=e.style;if(l||(t=rt(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"===(o=typeof n)&&(i=de.exec(n))&&i[1]&&(n=ye(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=re(t);return Ge.test(t)||(t=rt(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Je(e,t,r)),"normal"===i&&t in at&&(i=at[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!it.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,r):Ye(e,ot,(function(){return ut(e,t,r)}))},set:function(e,n,r){var i,o=Ke(e),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===E.css(e,"boxSizing",!1,o),l=r?lt(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-lt(e,t,"border",!1,o)-.5)),l&&(i=de.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),st(0,n,l)}}})),E.cssHooks.marginLeft=Ze(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+pe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=st)})),E.fn.extend({css:function(e,t){return Z(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ke(e),i=t.length;a1)}}),E.Tween=ct,ct.prototype={constructor:ct,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=ct.propHooks[this.prop];return e&&e.get?e.get(this):ct.propHooks._default.get(this)},run:function(e){var t,n=ct.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ct.propHooks._default.set(this),this}},ct.prototype.init.prototype=ct.prototype,ct.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},ct.propHooks.scrollTop=ct.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=ct.prototype.init,E.fx.step={};var ft,dt,pt=/^(?:toggle|show|hide)$/,ht=/queueHooks$/;function mt(){dt&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(mt):n.setTimeout(mt,E.fx.interval),E.fx.tick())}function vt(){return n.setTimeout((function(){ft=void 0})),ft=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=pe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function yt(e,t,n){for(var r,i=(bt.tweeners[t]||[]).concat(bt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(V);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=_t[t]||E.find.attr;_t[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=_t[a],_t[a]=i,i=null!=n(e,t,r)?a:null,_t[a]=o),i}}));var kt=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;function Et(e){return(e.match(V)||[]).join(" ")}function St(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(V)||[]}E.fn.extend({prop:function(e,t){return Z(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,i,o,a;return g(e)?this.each((function(t){E(this).addClass(e.call(this,t,St(this)))})):(t=Ct(e)).length?this.each((function(){if(r=St(this),n=1===this.nodeType&&" "+Et(r)+" "){for(o=0;o-1;)n=n.replace(" "+i+" "," ");a=Et(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return g(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,St(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Ct(e),this.each((function(){if(s)for(o=E(this),i=0;i-1)return!0;return!1}});var Tt=/\r/g;E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=g(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,E(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Tt,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:Et(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Ot=n.location,At={guid:Date.now()},Pt=/\?/;E.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||E.error("Invalid XML: "+(r?E.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var jt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,r,i){var o,a,s,l,u,c,f,d,h=[r||b],m=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(a=d=s=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!jt.test(m+E.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[E.expando]?e:new E.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:E.makeArray(t,[e]),f=E.event.special[m]||{},i||!f.trigger||!1!==f.trigger.apply(r,t))){if(!i&&!f.noBubble&&!y(r)){for(l=f.delegateType||m,jt.test(l+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)d=a,e.type=o>1?l:f.bindType||m,(c=(ae.get(a,"events")||Object.create(null))[e.type]&&ae.get(a,"handle"))&&c.apply(a,t),(c=u&&a[u])&&c.apply&&ie(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!ie(r)||u&&g(r[m])&&!y(r)&&((s=r[u])&&(r[u]=null),E.event.triggered=m,e.isPropagationStopped()&&d.addEventListener(m,Nt),r[m](),e.isPropagationStopped()&&d.removeEventListener(m,Nt),E.event.triggered=void 0,s&&(r[u]=s)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}});var Dt=/\[\]$/,Lt=/\r?\n/g,Rt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Mt(e,t,n,r){var i;if(Array.isArray(t))E.each(t,(function(t,i){n||Dt.test(e)?r(e,i):Mt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==k(t))r(e,t);else for(i in t)Mt(e+"["+i+"]",t[i],n,r)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){i(this.name,this.value)}));else for(n in e)Mt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&It.test(this.nodeName)&&!Rt.test(e)&&(this.checked||!Ee.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}})):{name:t.name,value:n.replace(Lt,"\r\n")}})).get()}});var Ht=/%20/g,$t=/#.*$/,zt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)$/gm,qt=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ft={},Wt={},Vt="*/".concat("*"),Xt=b.createElement("a");function Gt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(V)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Kt(e,t,n,r){var i={},o=e===Wt;function a(s){var l;return i[s]=!0,E.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Yt(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Xt.href=Ot.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Yt(Yt(e,E.ajaxSettings),t):Yt(E.ajaxSettings,e)},ajaxPrefilter:Gt(Ft),ajaxTransport:Gt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,l,u,c,f,d,p=E.ajaxSetup({},t),h=p.context||p,m=p.context&&(h.nodeType||h.jquery)?E(h):E.event,v=E.Deferred(),g=E.Callbacks("once memory"),y=p.statusCode||{},w={},_={},k="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Ut.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)x.always(e[x.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||k;return r&&r.abort(t),S(0,t),this}};if(v.promise(x),p.url=((e||p.url||Ot.href)+"").replace(Bt,Ot.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(V)||[""],null==p.crossDomain){l=b.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Xt.protocol+"//"+Xt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=E.param(p.data,p.traditional)),Kt(Ft,p,t,x),u)return x;for(f in(c=E.event&&p.global)&&0==E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!qt.test(p.type),i=p.url.replace($t,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ht,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Pt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(zt,"$1"),d=(Pt.test(i)?"&":"?")+"_="+At.guid+++d),p.url=i+d),p.ifModified&&(E.lastModified[i]&&x.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&x.setRequestHeader("If-None-Match",E.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Vt+"; q=0.01":""):p.accepts["*"]),p.headers)x.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,x,p)||u))return x.abort();if(k="abort",g.add(p.complete),x.done(p.success),x.fail(p.error),r=Kt(Wt,p,t,x)){if(x.readyState=1,c&&m.trigger("ajaxSend",[x,p]),u)return x;p.async&&p.timeout>0&&(s=n.setTimeout((function(){x.abort("timeout")}),p.timeout));try{u=!1,r.send(w,S)}catch(e){if(u)throw e;S(-1,e)}}else S(-1,"No Transport");function S(e,t,a,l){var f,d,b,w,_,k=t;u||(u=!0,s&&n.clearTimeout(s),r=void 0,o=l||"",x.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,x,a)),!f&&E.inArray("script",p.dataTypes)>-1&&E.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,w,x,f),f?(p.ifModified&&((_=x.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=_),(_=x.getResponseHeader("etag"))&&(E.etag[i]=_)),204===e||"HEAD"===p.type?k="nocontent":304===e?k="notmodified":(k=w.state,d=w.data,f=!(b=w.error))):(b=k,!e&&k||(k="error",e<0&&(e=0))),x.status=e,x.statusText=(t||k)+"",f?v.resolveWith(h,[d,k,x]):v.rejectWith(h,[x,k,b]),x.statusCode(y),y=void 0,c&&m.trigger(f?"ajaxSuccess":"ajaxError",[x,p,f?d:b]),g.fireWith(h,[x,k]),c&&(m.trigger("ajaxComplete",[x,p]),--E.active||E.event.trigger("ajaxStop")))}return x},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:i,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Qt={0:200,1223:204},Jt=E.ajaxSettings.xhr();v.cors=!!Jt&&"withCredentials"in Jt,v.ajax=Jt=!!Jt,E.ajaxTransport((function(e){var t,r;if(v.cors||Jt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Qt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=E(" + + + + +PrimeWire - Social Movie & TV Tracker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+
+ + + + + +
Try our new domain, PrimeWire.mov
+
+ +
+

+Legal Stuff +

+ +

General

+

Our terms of service are to be taken into consideration and adhered to at all times whilst using the site. All users are advised that access to this site and the use of the services detailed therein are strictly conditional upon your confirmation that you comply fully with our terms of use. By proceeding to surf primewire.ag or otherwise using this site, you signify your unequivocal acceptance of these and any other terms prevailing at this or at any future time.

+

Governing Law

+

The governing law imposed will be that of the Klingon Empire, the country in which primewire.ag is based and from which all services are provided.

+

Relationship

+

The relationship between you (the user) and us (primewire.ag, our agents and partners) is that we provide you with access to the referencing material and media contained within our site, which is provided to you on a purely non commercial basis and is, therefore, not that of customer and supplier.

+

Content

+

primewire.ag does not host, provide, archive, store, or distribute media of any kind, and acts merely as an index (or directory) of media posted by other webmasters on the internet, which is completely outside of our control.

+

Whereas we do not filter such references, we cannot and do not attempt to control, censor, or block any indexed material that may be considered offensive, abusive, libellous, obnoxious, inaccurate, deceptive, unlawful or otherwise distressing neither do we accept responsibility for this content or the consequences of such content being made available.

+

Material may be inappropriately described or subject to restrictions such as copyright, licensing and other limitations and it is the sole responsibility of those having access to such material to comply with any or all lawful obligations arising from such material coming into their possession and, thus mitigate any alleged transgression.

+

All users warrant that they are 18 years of age or older, and, therefore, qualified to enter into this agreement either as an individual or as a corporate entity.

+

All users undertake to comply with the national laws applicable to the country they reside in and observe the rights inherent in any copyright material whilst upholding the rights of any copyright owner.

+

All users are advised to use caution, discretion, common sense and personal judgment when using primewire.ag or any references detailed within the directory and to respect the wishes of others who may value freedom from censorship, as consenting adults equal to (or possibly superior to) your own personal preferences.

+

Quality Of Service

+

primewire.ag does not provide commercial services and there are no actual or implied guarantees as to the availability of service or the speed, operation or function of this site, which is offered on a basis to those who choose to comply with the terms detailed within and access the �free� contents of this site.

+

Privacy, Spam & Unsolicited Contact

+

This site will comply with the requirements of any law enforcement or other officials, Courts, Police or others with a legitimate interest in the official investigation or enforcement of law applicable to the country in which our service is provided, United Kingdom.

+

The protection of the rights of others is of paramount importance to primewire.ag, and this extends to your adherence to intellectual property law, the laws prevailing in your country or residence (or any temporary residence), the rights of others to enjoy freedom from slander, libel, defamation, provocation, harassment, discrimination of any kind or any other action that may be deemed offensive by the individual concerned or the management of this site.

+

Users may not use the primewire.ag site or any facilities provided by us to spam, market or promote any goods, services, membership or other websites.

+

Intellectual Property - General

+

primewire.ag respects the rights of others, and prohibits the use of referenced material for any purpose other than that for which it is intended (where such use is lawful and free of civil liability or other constraint) and in such circumstances where possession of such material may have any adverse financial, prejudicial or any other effect on any other third party.

+

primewire.ag is copyrighted, and all rights are reserved, as those are of the proprietors and those of the partners websites material referenced within. Anyone found imitating the site or stealing content from the site will be liable to prosecution.

+

Definitions

+

The term �the site� applies to the site (primewire.ag), its staff, administration, owners, agents, representatives, suppliers and partners. The term �the user� applies to any site visitor who wishes to proceed surfing the site once arriving at primewire.ag.

+

Agreement

+

In usage of this site, or by otherwise using this site, you (the user), hereby undertake to adhere to the terms of use detailed herein and any others appended hereto, without evasion, equivocation or reservation of any kind, in the knowledge that failure to comply with the terms will result in suspension or denial of your access to the site and potential legal and civil penalties, together with the right to make the full circumstances publicly known.

+

Your Privacy

+

primewire.ag is committed to protecting your privacy. primewire.ag does not sell, trade or rent your personal information to any other companies. primewire.ag will not collect any personal information about you except when you specifically and knowingly provide such information when registering for the site.

+

By using our Website, you consent to the collection and use of this information by primewire.ag. If we decide to change our privacy policy, we will post any changes to this page so that you are always aware of which information we collect, how we use it, and under which circumstances we disclose it.

+ +
+
+ + +
+ + +
+ + + + + + +
+ +
+ + + +
+ + + + + diff --git a/src/utils/__fixtures__/StreamResolver/https:www.primewire.tfmovie151849-solaris b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tfmovie151849-solaris new file mode 100644 index 0000000..e23a14b --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.primewire.tfmovie151849-solaris @@ -0,0 +1,1246 @@ + + + + + + + + + + +Solaris (1972) | PrimeWire + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + +
+
+ + + + + +
Try our new domain, PrimeWire.mov
+
+ + + +
+[X] +
+ Report Link +
+
Video has been deleted
+
Wrong video
+
Audio out of sync
+
There was an error converting the video
+
Other (explain below)
+
+
+
+ Details:
+ +
+ +
+
+
+
+

+ Solaris (1972) + +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+A psychologist is sent to a station orbiting a distant planet in order to discover what has caused the crew to go insane. + +

+
+
+ + + + + +
+
+
    + +
  • Currently 3.769230769230769/5
  • +
  • +
  • +
  • +
  • +
  • +
+
(13 votes)
+
+ + + + + +
+ + + + + + + +
+ +
+
+ +
+ + +
+
Ratings:IMDB: + + 8.1/10 + +
Released: + +September 26, 1972 + +
Runtime: +167 min +
Genres: + + Drama + + Mystery + + Sci-Fi + +
AKA: + Solyaris +
Companies: + + Mosfilm + + Chetvyortoe Tvorcheskoe Obedinenie + + Unit Four + + Creative Unit of Writers & Cinema Workers + + Mosfilm + +
Cast: + + + Donatas Banionis + + + + Jüri Järvet + + + + Natalya Bondarchuk + + + + Vladislav Dvorzhetskiy + + + +
Crew: + + + Andrei Tarkovsky + + + + Stanislaw Lem + + + + Fridrikh Gorenshteyn + + + +
+ + + + + + + +
+
+ + + + + + + + + + + + +
+ + +
+ + + +
+ +

Trailers (5)

+ + + + +

Free Links

+
+ + + + + + + + + + + + + + + + + + + + +
+ + + Version 1 + + + + + + + 1.8 GB + + + +dood.watch + 55 views + + Report Link + + +
+
    + +
  • Currently 3.3284671532846715/5
  • +
  • +
  • +
  • +
  • +
  • +
+
+
(274 votes)
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+ + + Version 2 + + + + + + + 2 GB + + + +mixdrop.ag + 149 views + + Report Link + + +
+
    + +
  • Currently 3.2340425531914896/5
  • +
  • +
  • +
  • +
  • +
  • +
+
+
(470 votes)
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+ + + Version 3 + + + + + + + 2 GB + + + +mixdrop.ag + 235 views + + Report Link + + +
+
    + +
  • Currently 3.2340425531914896/5
  • +
  • +
  • +
  • +
  • +
  • +
+
+
(470 votes)
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+ + + Version 4 + + + + + + + + +dailymotion.com + 50 views + + Report Link + + +
+
    + +
  • Currently 3.6/5
  • +
  • +
  • +
  • +
  • +
  • +
+
+
(5 votes)
+
+
+
+
+
+ + + + + + + + + + + + + + + + +
+ + + Version 5 + + + + + + + + +youtube.com + 10 views + + Report Link + + +
+
    + +
  • Currently 2.3939393939393936/5
  • +
  • +
  • +
  • +
  • +
  • +
+
+
(33 votes)
+
+
+
+
+
+ + +
+ + + + + + + + + + + + +
= Low Quality= Medium Quality= High QualityHow do I watch these?
+ + +
+

Search on other sites

+ +
+ + + +

+Streaming Services + + + +

+ +
+ + + + +Subscription + + + +Buy/Rent + + + +
+ +
+ + + +

Popular PlaylistsMore

+ + +
+

Similar TitlesMore

+
+
+ + +

Solaris Comments

+ + +

Post a Comment

+ + + +
Please login to make a comment
+ +

+Comments + + + +

+ + + + +
+ + +
+ + + +
+ + +
+ + +
+ + + + + + +
+ +
+ + + + + +
+ + + + + diff --git a/src/utils/__fixtures__/StreamResolver/https:www.youtube.comwatchvZ8ZhQPaw4rE b/src/utils/__fixtures__/StreamResolver/https:www.youtube.comwatchvZ8ZhQPaw4rE new file mode 100644 index 0000000..323fcdd --- /dev/null +++ b/src/utils/__fixtures__/StreamResolver/https:www.youtube.comwatchvZ8ZhQPaw4rE @@ -0,0 +1,84 @@ + - YouTube
InfoPresseUrheberrechtKontaktCreatorWerbenEntwicklerImpressumVerträge hier kündigenNutzungsbedingungenDatenschutzRichtlinien & SicherheitWie funktioniert YouTube?Neue Funktionen testen
\ No newline at end of file diff --git a/src/utils/__snapshots__/StreamResolver.test.ts.snap b/src/utils/__snapshots__/StreamResolver.test.ts.snap index d3608d9..c097f06 100644 --- a/src/utils/__snapshots__/StreamResolver.test.ts.snap +++ b/src/utils/__snapshots__/StreamResolver.test.ts.snap @@ -378,3 +378,18 @@ exports[`resolve returns source errors as stream 2`] = ` ], } `; + +exports[`resolve returns ytId instead of url for YouTube video 1`] = ` +[ + { + "behaviorHints": { + "bingeGroup": "webstreamr-youtube_en", + "notWebReady": true, + }, + "name": "WebStreamr 🇺🇸", + "title": "Solaris | SCIENCE FICTION | FULL MOVIE | directed by Tarkovsky +🔗 YouTube", + "ytId": "Z8ZhQPaw4rE", + }, +] +`;