File "e335354e67a79eccc8886a41e2ae74a5.js"
Full path: /home/argothem/www/organecyberpresse/local/cache-js/e335354e67a79eccc8886a41e2ae74a5.js
File size: 480 KB
MIME-type: text/plain
Charset: utf-8
/* compact [
prive/javascript/jquery.js?1749554704
prive/javascript/jquery.form.js?1749554704
prive/javascript/jquery.autosave.js?1749554704
prive/javascript/jquery.placeholder-label.js?1749554704
prive/javascript/ajaxCallback.js?1749554704
prive/javascript/js.cookie.js?1749554704
plugins/auto/select2/v2.1.0/javascript/select2.fork.full.js?1720198650
plugins/auto/select2/v2.1.0/lib/select2/js/i18n/fr.js?1720198650
plugins/auto/select2/v2.1.0/javascript/SpipSelect2.js?1720198650
plugins/auto/select2/v2.1.0/javascript/SpipSelect2Loader.js?1720198650
plugins-dist/mediabox/lib/lity/lity.js?1749555108
plugins-dist/mediabox/lity/js/lity.mediabox.js?1749555108
plugins-dist/mediabox/javascript/spip.mediabox.js?1749555108
plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1749555110
plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1749555110
local/cache-js/jsdyn-javascript_porte_plume_start_js-21eb9f36.js?1756489818
prive/javascript/js.cookie.js?1749554704
local/cache-js/jsdyn-socialtags_js-35c7c9ea.js?1756489818
local/cache-js/jsdyn-jquery_cookiebar_js-4c7fc757.js?1756489818
plugins/auto/cookiebar/v1.3.0/js/jquery.cookiebar.call.js?1720198656
plugins/auto/boutonstexte/v3.1.0/javascript/boutonstexte.js?1720198672
plugins/auto/saisies/v5.14.0/javascript/saisies.js?1755204172
plugins/auto/saisies/v5.14.0/javascript/saisies_textarea_counter.js?1755204172
plugins/auto/saisies/v5.14.0/javascript/saisies_afficher_si.js?1755204172
plugins/auto/slick/v2.1.0/lib/slick/slick.min.js
local/cache-js/jsdyn-javascript_slick_spip_js-8b33efde.js?1756489818
] 63% */
/* prive/javascript/jquery.js?1749554704 */
(function(global,factory){
"use strict";
if(typeof module==="object"&&typeof module.exports==="object"){
module.exports=global.document?
factory(global,true):
function(w){
if(!w.document){
throw new Error("jQuery requires a window with a document");
}
return factory(w);
};
}else{
factory(global);
}
})(typeof window!=="undefined"?window:this,function(window,noGlobal){
"use strict";
var arr=[];
var getProto=Object.getPrototypeOf;
var slice=arr.slice;
var flat=arr.flat?function(array){
return arr.flat.call(array);
}:function(array){
return arr.concat.apply([],array);
};
var push=arr.push;
var indexOf=arr.indexOf;
var class2type={};
var toString=class2type.toString;
var hasOwn=class2type.hasOwnProperty;
var fnToString=hasOwn.toString;
var ObjectFunctionString=fnToString.call(Object);
var support={};
var isFunction=function isFunction(obj){
return typeof obj==="function"&&typeof obj.nodeType!=="number"&&
typeof obj.item!=="function";
};
var isWindow=function isWindow(obj){
return obj!=null&&obj===obj.window;
};
var document=window.document;
var preservedScriptAttributes={
type:true,
src:true,
nonce:true,
noModule:true
};
function DOMEval(code,node,doc){
doc=doc||document;
var i,val,
script=doc.createElement("script");
script.text=code;
if(node){
for(i in preservedScriptAttributes){
val=node[i]||node.getAttribute&&node.getAttribute(i);
if(val){
script.setAttribute(i,val);
}
}
}
doc.head.appendChild(script).parentNode.removeChild(script);
}
function toType(obj){
if(obj==null){
return obj+"";
}
return typeof obj==="object"||typeof obj==="function"?
class2type[toString.call(obj)]||"object":
typeof obj;
}
var version="3.7.1",
rhtmlSuffix=/HTML$/i,
jQuery=function(selector,context){
return new jQuery.fn.init(selector,context);
};
jQuery.fn=jQuery.prototype={
jquery:version,
constructor:jQuery,
length:0,
toArray:function(){
return slice.call(this);
},
get:function(num){
if(num==null){
return slice.call(this);
}
return num<0?this[num+this.length]:this[num];
},
pushStack:function(elems){
var ret=jQuery.merge(this.constructor(),elems);
ret.prevObject=this;
return ret;
},
each:function(callback){
return jQuery.each(this,callback);
},
map:function(callback){
return this.pushStack(jQuery.map(this,function(elem,i){
return callback.call(elem,i,elem);
}));
},
slice:function(){
return this.pushStack(slice.apply(this,arguments));
},
first:function(){
return this.eq(0);
},
last:function(){
return this.eq(-1);
},
even:function(){
return this.pushStack(jQuery.grep(this,function(_elem,i){
return(i+1)%2;
}));
},
odd:function(){
return this.pushStack(jQuery.grep(this,function(_elem,i){
return i%2;
}));
},
eq:function(i){
var len=this.length,
j=+i+(i<0?len:0);
return this.pushStack(j>=0&&j<len?[this[j]]:[]);
},
end:function(){
return this.prevObject||this.constructor();
},
push:push,
sort:arr.sort,
splice:arr.splice
};
jQuery.extend=jQuery.fn.extend=function(){
var options,name,src,copy,copyIsArray,clone,
target=arguments[0]||{},
i=1,
length=arguments.length,
deep=false;
if(typeof target==="boolean"){
deep=target;
target=arguments[i]||{};
i++;
}
if(typeof target!=="object"&&!isFunction(target)){
target={};
}
if(i===length){
target=this;
i--;
}
for(;i<length;i++){
if((options=arguments[i])!=null){
for(name in options){
copy=options[name];
if(name==="__proto__"||target===copy){
continue;
}
if(deep&©&&(jQuery.isPlainObject(copy)||
(copyIsArray=Array.isArray(copy)))){
src=target[name];
if(copyIsArray&&!Array.isArray(src)){
clone=[];
}else if(!copyIsArray&&!jQuery.isPlainObject(src)){
clone={};
}else{
clone=src;
}
copyIsArray=false;
target[name]=jQuery.extend(deep,clone,copy);
}else if(copy!==undefined){
target[name]=copy;
}
}
}
}
return target;
};
jQuery.extend({
expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),
isReady:true,
error:function(msg){
throw new Error(msg);
},
noop:function(){},
isPlainObject:function(obj){
var proto,Ctor;
if(!obj||toString.call(obj)!=="[object Object]"){
return false;
}
proto=getProto(obj);
if(!proto){
return true;
}
Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;
return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;
},
isEmptyObject:function(obj){
var name;
for(name in obj){
return false;
}
return true;
},
globalEval:function(code,options,doc){
DOMEval(code,{nonce:options&&options.nonce},doc);
},
each:function(obj,callback){
var length,i=0;
if(isArrayLike(obj)){
length=obj.length;
for(;i<length;i++){
if(callback.call(obj[i],i,obj[i])===false){
break;
}
}
}else{
for(i in obj){
if(callback.call(obj[i],i,obj[i])===false){
break;
}
}
}
return obj;
},
text:function(elem){
var node,
ret="",
i=0,
nodeType=elem.nodeType;
if(!nodeType){
while((node=elem[i++])){
ret+=jQuery.text(node);
}
}
if(nodeType===1||nodeType===11){
return elem.textContent;
}
if(nodeType===9){
return elem.documentElement.textContent;
}
if(nodeType===3||nodeType===4){
return elem.nodeValue;
}
return ret;
},
makeArray:function(arr,results){
var ret=results||[];
if(arr!=null){
if(isArrayLike(Object(arr))){
jQuery.merge(ret,
typeof arr==="string"?
[arr]:arr
);
}else{
push.call(ret,arr);
}
}
return ret;
},
inArray:function(elem,arr,i){
return arr==null?-1:indexOf.call(arr,elem,i);
},
isXMLDoc:function(elem){
var namespace=elem&&elem.namespaceURI,
docElem=elem&&(elem.ownerDocument||elem).documentElement;
return!rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML");
},
merge:function(first,second){
var len=+second.length,
j=0,
i=first.length;
for(;j<len;j++){
first[i++]=second[j];
}
first.length=i;
return first;
},
grep:function(elems,callback,invert){
var callbackInverse,
matches=[],
i=0,
length=elems.length,
callbackExpect=!invert;
for(;i<length;i++){
callbackInverse=!callback(elems[i],i);
if(callbackInverse!==callbackExpect){
matches.push(elems[i]);
}
}
return matches;
},
map:function(elems,callback,arg){
var length,value,
i=0,
ret=[];
if(isArrayLike(elems)){
length=elems.length;
for(;i<length;i++){
value=callback(elems[i],i,arg);
if(value!=null){
ret.push(value);
}
}
}else{
for(i in elems){
value=callback(elems[i],i,arg);
if(value!=null){
ret.push(value);
}
}
}
return flat(ret);
},
guid:1,
support:support
});
if(typeof Symbol==="function"){
jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];
}
jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
function(_i,name){
class2type["[object "+name+"]"]=name.toLowerCase();
});
function isArrayLike(obj){
var length=!!obj&&"length"in obj&&obj.length,
type=toType(obj);
if(isFunction(obj)||isWindow(obj)){
return false;
}
return type==="array"||length===0||
typeof length==="number"&&length>0&&(length-1)in obj;
}
function nodeName(elem,name){
return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();
}
var pop=arr.pop;
var sort=arr.sort;
var splice=arr.splice;
var whitespace="[\\x20\\t\\r\\n\\f]";
var rtrimCSS=new RegExp(
"^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$",
"g"
);
jQuery.contains=function(a,b){
var bup=b&&b.parentNode;
return a===bup||!!(bup&&bup.nodeType===1&&(
a.contains?
a.contains(bup):
a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16
));
};
var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
function fcssescape(ch,asCodePoint){
if(asCodePoint){
if(ch==="\0"){
return"\uFFFD";
}
return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";
}
return"\\"+ch;
}
jQuery.escapeSelector=function(sel){
return(sel+"").replace(rcssescape,fcssescape);
};
var preferredDoc=document,
pushNative=push;
(function(){
var i,
Expr,
outermostContext,
sortInput,
hasDuplicate,
push=pushNative,
document,
documentElement,
documentIsHTML,
rbuggyQSA,
matches,
expando=jQuery.expando,
dirruns=0,
done=0,
classCache=createCache(),
tokenCache=createCache(),
compilerCache=createCache(),
nonnativeSelectorCache=createCache(),
sortOrder=function(a,b){
if(a===b){
hasDuplicate=true;
}
return 0;
},
booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+
"loop|multiple|open|readonly|required|scoped",
identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+
"*([*^$|!~]?=)"+whitespace+
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+
whitespace+"*\\]",
pseudos=":("+identifier+")(?:\\(("+
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+
"((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+
".*"+
")\\)|)",
rwhitespace=new RegExp(whitespace+"+","g"),
rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),
rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+
whitespace+"*"),
rdescend=new RegExp(whitespace+"|>"),
rpseudo=new RegExp(pseudos),
ridentifier=new RegExp("^"+identifier+"$"),
matchExpr={
ID:new RegExp("^#("+identifier+")"),
CLASS:new RegExp("^\\.("+identifier+")"),
TAG:new RegExp("^("+identifier+"|[*])"),
ATTR:new RegExp("^"+attributes),
PSEUDO:new RegExp("^"+pseudos),
CHILD:new RegExp(
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+
whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+
whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),
bool:new RegExp("^(?:"+booleans+")$","i"),
needsContext:new RegExp("^"+whitespace+
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+
"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")
},
rinputs=/^(?:input|select|textarea|button)$/i,
rheader=/^h\d$/i,
rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling=/[+~]/,
runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+
"?|\\\\([^\\r\\n\\f])","g"),
funescape=function(escape,nonHex){
var high="0x"+escape.slice(1)-0x10000;
if(nonHex){
return nonHex;
}
return high<0?
String.fromCharCode(high+0x10000):
String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);
},
unloadHandler=function(){
setDocument();
},
inDisabledFieldset=addCombinator(
function(elem){
return elem.disabled===true&&nodeName(elem,"fieldset");
},
{dir:"parentNode",next:"legend"}
);
function safeActiveElement(){
try{
return document.activeElement;
}catch(err){}
}
try{
push.apply(
(arr=slice.call(preferredDoc.childNodes)),
preferredDoc.childNodes
);
arr[preferredDoc.childNodes.length].nodeType;
}catch(e){
push={
apply:function(target,els){
pushNative.apply(target,slice.call(els));
},
call:function(target){
pushNative.apply(target,slice.call(arguments,1));
}
};
}
function find(selector,context,results,seed){
var m,i,elem,nid,match,groups,newSelector,
newContext=context&&context.ownerDocument,
nodeType=context?context.nodeType:9;
results=results||[];
if(typeof selector!=="string"||!selector||
nodeType!==1&&nodeType!==9&&nodeType!==11){
return results;
}
if(!seed){
setDocument(context);
context=context||document;
if(documentIsHTML){
if(nodeType!==11&&(match=rquickExpr.exec(selector))){
if((m=match[1])){
if(nodeType===9){
if((elem=context.getElementById(m))){
if(elem.id===m){
push.call(results,elem);
return results;
}
}else{
return results;
}
}else{
if(newContext&&(elem=newContext.getElementById(m))&&
find.contains(context,elem)&&
elem.id===m){
push.call(results,elem);
return results;
}
}
}else if(match[2]){
push.apply(results,context.getElementsByTagName(selector));
return results;
}else if((m=match[3])&&context.getElementsByClassName){
push.apply(results,context.getElementsByClassName(m));
return results;
}
}
if(!nonnativeSelectorCache[selector+" "]&&
(!rbuggyQSA||!rbuggyQSA.test(selector))){
newSelector=selector;
newContext=context;
if(nodeType===1&&
(rdescend.test(selector)||rleadingCombinator.test(selector))){
newContext=rsibling.test(selector)&&testContext(context.parentNode)||
context;
if(newContext!=context||!support.scope){
if((nid=context.getAttribute("id"))){
nid=jQuery.escapeSelector(nid);
}else{
context.setAttribute("id",(nid=expando));
}
}
groups=tokenize(selector);
i=groups.length;
while(i--){
groups[i]=(nid?"#"+nid:":scope")+" "+
toSelector(groups[i]);
}
newSelector=groups.join(",");
}
try{
push.apply(results,
newContext.querySelectorAll(newSelector)
);
return results;
}catch(qsaError){
nonnativeSelectorCache(selector,true);
}finally{
if(nid===expando){
context.removeAttribute("id");
}
}
}
}
}
return select(selector.replace(rtrimCSS,"$1"),context,results,seed);
}
function createCache(){
var keys=[];
function cache(key,value){
if(keys.push(key+" ")>Expr.cacheLength){
delete cache[keys.shift()];
}
return(cache[key+" "]=value);
}
return cache;
}
function markFunction(fn){
fn[expando]=true;
return fn;
}
function assert(fn){
var el=document.createElement("fieldset");
try{
return!!fn(el);
}catch(e){
return false;
}finally{
if(el.parentNode){
el.parentNode.removeChild(el);
}
el=null;
}
}
function createInputPseudo(type){
return function(elem){
return nodeName(elem,"input")&&elem.type===type;
};
}
function createButtonPseudo(type){
return function(elem){
return(nodeName(elem,"input")||nodeName(elem,"button"))&&
elem.type===type;
};
}
function createDisabledPseudo(disabled){
return function(elem){
if("form"in elem){
if(elem.parentNode&&elem.disabled===false){
if("label"in elem){
if("label"in elem.parentNode){
return elem.parentNode.disabled===disabled;
}else{
return elem.disabled===disabled;
}
}
return elem.isDisabled===disabled||
elem.isDisabled!==!disabled&&
inDisabledFieldset(elem)===disabled;
}
return elem.disabled===disabled;
}else if("label"in elem){
return elem.disabled===disabled;
}
return false;
};
}
function createPositionalPseudo(fn){
return markFunction(function(argument){
argument=+argument;
return markFunction(function(seed,matches){
var j,
matchIndexes=fn([],seed.length,argument),
i=matchIndexes.length;
while(i--){
if(seed[(j=matchIndexes[i])]){
seed[j]=!(matches[j]=seed[j]);
}
}
});
});
}
function testContext(context){
return context&&typeof context.getElementsByTagName!=="undefined"&&context;
}
function setDocument(node){
var subWindow,
doc=node?node.ownerDocument||node:preferredDoc;
if(doc==document||doc.nodeType!==9||!doc.documentElement){
return document;
}
document=doc;
documentElement=document.documentElement;
documentIsHTML=!jQuery.isXMLDoc(document);
matches=documentElement.matches||
documentElement.webkitMatchesSelector||
documentElement.msMatchesSelector;
if(documentElement.msMatchesSelector&&
preferredDoc!=document&&
(subWindow=document.defaultView)&&subWindow.top!==subWindow){
subWindow.addEventListener("unload",unloadHandler);
}
support.getById=assert(function(el){
documentElement.appendChild(el).id=jQuery.expando;
return!document.getElementsByName||
!document.getElementsByName(jQuery.expando).length;
});
support.disconnectedMatch=assert(function(el){
return matches.call(el,"*");
});
support.scope=assert(function(){
return document.querySelectorAll(":scope");
});
support.cssHas=assert(function(){
try{
document.querySelector(":has(*,:jqfake)");
return false;
}catch(e){
return true;
}
});
if(support.getById){
Expr.filter.ID=function(id){
var attrId=id.replace(runescape,funescape);
return function(elem){
return elem.getAttribute("id")===attrId;
};
};
Expr.find.ID=function(id,context){
if(typeof context.getElementById!=="undefined"&&documentIsHTML){
var elem=context.getElementById(id);
return elem?[elem]:[];
}
};
}else{
Expr.filter.ID=function(id){
var attrId=id.replace(runescape,funescape);
return function(elem){
var node=typeof elem.getAttributeNode!=="undefined"&&
elem.getAttributeNode("id");
return node&&node.value===attrId;
};
};
Expr.find.ID=function(id,context){
if(typeof context.getElementById!=="undefined"&&documentIsHTML){
var node,i,elems,
elem=context.getElementById(id);
if(elem){
node=elem.getAttributeNode("id");
if(node&&node.value===id){
return[elem];
}
elems=context.getElementsByName(id);
i=0;
while((elem=elems[i++])){
node=elem.getAttributeNode("id");
if(node&&node.value===id){
return[elem];
}
}
}
return[];
}
};
}
Expr.find.TAG=function(tag,context){
if(typeof context.getElementsByTagName!=="undefined"){
return context.getElementsByTagName(tag);
}else{
return context.querySelectorAll(tag);
}
};
Expr.find.CLASS=function(className,context){
if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){
return context.getElementsByClassName(className);
}
};
rbuggyQSA=[];
assert(function(el){
var input;
documentElement.appendChild(el).innerHTML=
"<a id='"+expando+"' href='' disabled='disabled'></a>"+
"<select id='"+expando+"-\r\\' disabled='disabled'>"+
"<option selected=''></option></select>";
if(!el.querySelectorAll("[selected]").length){
rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");
}
if(!el.querySelectorAll("[id~="+expando+"-]").length){
rbuggyQSA.push("~=");
}
if(!el.querySelectorAll("a#"+expando+"+*").length){
rbuggyQSA.push(".#.+[+~]");
}
if(!el.querySelectorAll(":checked").length){
rbuggyQSA.push(":checked");
}
input=document.createElement("input");
input.setAttribute("type","hidden");
el.appendChild(input).setAttribute("name","D");
documentElement.appendChild(el).disabled=true;
if(el.querySelectorAll(":disabled").length!==2){
rbuggyQSA.push(":enabled",":disabled");
}
input=document.createElement("input");
input.setAttribute("name","");
el.appendChild(input);
if(!el.querySelectorAll("[name='']").length){
rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+
whitespace+"*(?:''|\"\")");
}
});
if(!support.cssHas){
rbuggyQSA.push(":has");
}
rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));
sortOrder=function(a,b){
if(a===b){
hasDuplicate=true;
return 0;
}
var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;
if(compare){
return compare;
}
compare=(a.ownerDocument||a)==(b.ownerDocument||b)?
a.compareDocumentPosition(b):
1;
if(compare&1||
(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){
if(a===document||a.ownerDocument==preferredDoc&&
find.contains(preferredDoc,a)){
return-1;
}
if(b===document||b.ownerDocument==preferredDoc&&
find.contains(preferredDoc,b)){
return 1;
}
return sortInput?
(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):
0;
}
return compare&4?-1:1;
};
return document;
}
find.matches=function(expr,elements){
return find(expr,null,null,elements);
};
find.matchesSelector=function(elem,expr){
setDocument(elem);
if(documentIsHTML&&
!nonnativeSelectorCache[expr+" "]&&
(!rbuggyQSA||!rbuggyQSA.test(expr))){
try{
var ret=matches.call(elem,expr);
if(ret||support.disconnectedMatch||
elem.document&&elem.document.nodeType!==11){
return ret;
}
}catch(e){
nonnativeSelectorCache(expr,true);
}
}
return find(expr,document,null,[elem]).length>0;
};
find.contains=function(context,elem){
if((context.ownerDocument||context)!=document){
setDocument(context);
}
return jQuery.contains(context,elem);
};
find.attr=function(elem,name){
if((elem.ownerDocument||elem)!=document){
setDocument(elem);
}
var fn=Expr.attrHandle[name.toLowerCase()],
val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?
fn(elem,name,!documentIsHTML):
undefined;
if(val!==undefined){
return val;
}
return elem.getAttribute(name);
};
find.error=function(msg){
throw new Error("Syntax error, unrecognized expression: "+msg);
};
jQuery.uniqueSort=function(results){
var elem,
duplicates=[],
j=0,
i=0;
hasDuplicate=!support.sortStable;
sortInput=!support.sortStable&&slice.call(results,0);
sort.call(results,sortOrder);
if(hasDuplicate){
while((elem=results[i++])){
if(elem===results[i]){
j=duplicates.push(i);
}
}
while(j--){
splice.call(results,duplicates[j],1);
}
}
sortInput=null;
return results;
};
jQuery.fn.uniqueSort=function(){
return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
};
Expr=jQuery.expr={
cacheLength:50,
createPseudo:markFunction,
match:matchExpr,
attrHandle:{},
find:{},
relative:{
">":{dir:"parentNode",first:true},
" ":{dir:"parentNode"},
"+":{dir:"previousSibling",first:true},
"~":{dir:"previousSibling"}
},
preFilter:{
ATTR:function(match){
match[1]=match[1].replace(runescape,funescape);
match[3]=(match[3]||match[4]||match[5]||"")
.replace(runescape,funescape);
if(match[2]==="~="){
match[3]=" "+match[3]+" ";
}
return match.slice(0,4);
},
CHILD:function(match){
match[1]=match[1].toLowerCase();
if(match[1].slice(0,3)==="nth"){
if(!match[3]){
find.error(match[0]);
}
match[4]=+(match[4]?
match[5]+(match[6]||1):
2*(match[3]==="even"||match[3]==="odd")
);
match[5]=+((match[7]+match[8])||match[3]==="odd");
}else if(match[3]){
find.error(match[0]);
}
return match;
},
PSEUDO:function(match){
var excess,
unquoted=!match[6]&&match[2];
if(matchExpr.CHILD.test(match[0])){
return null;
}
if(match[3]){
match[2]=match[4]||match[5]||"";
}else if(unquoted&&rpseudo.test(unquoted)&&
(excess=tokenize(unquoted,true))&&
(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){
match[0]=match[0].slice(0,excess);
match[2]=unquoted.slice(0,excess);
}
return match.slice(0,3);
}
},
filter:{
TAG:function(nodeNameSelector){
var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();
return nodeNameSelector==="*"?
function(){
return true;
}:
function(elem){
return nodeName(elem,expectedNodeName);
};
},
CLASS:function(className){
var pattern=classCache[className+" "];
return pattern||
(pattern=new RegExp("(^|"+whitespace+")"+className+
"("+whitespace+"|$)"))&&
classCache(className,function(elem){
return pattern.test(
typeof elem.className==="string"&&elem.className||
typeof elem.getAttribute!=="undefined"&&
elem.getAttribute("class")||
""
);
});
},
ATTR:function(name,operator,check){
return function(elem){
var result=find.attr(elem,name);
if(result==null){
return operator==="!=";
}
if(!operator){
return true;
}
result+="";
if(operator==="="){
return result===check;
}
if(operator==="!="){
return result!==check;
}
if(operator==="^="){
return check&&result.indexOf(check)===0;
}
if(operator==="*="){
return check&&result.indexOf(check)>-1;
}
if(operator==="$="){
return check&&result.slice(-check.length)===check;
}
if(operator==="~="){
return(" "+result.replace(rwhitespace," ")+" ")
.indexOf(check)>-1;
}
if(operator==="|="){
return result===check||result.slice(0,check.length+1)===check+"-";
}
return false;
};
},
CHILD:function(type,what,_argument,first,last){
var simple=type.slice(0,3)!=="nth",
forward=type.slice(-4)!=="last",
ofType=what==="of-type";
return first===1&&last===0?
function(elem){
return!!elem.parentNode;
}:
function(elem,_context,xml){
var cache,outerCache,node,nodeIndex,start,
dir=simple!==forward?"nextSibling":"previousSibling",
parent=elem.parentNode,
name=ofType&&elem.nodeName.toLowerCase(),
useCache=!xml&&!ofType,
diff=false;
if(parent){
if(simple){
while(dir){
node=elem;
while((node=node[dir])){
if(ofType?
nodeName(node,name):
node.nodeType===1){
return false;
}
}
start=dir=type==="only"&&!start&&"nextSibling";
}
return true;
}
start=[forward?parent.firstChild:parent.lastChild];
if(forward&&useCache){
outerCache=parent[expando]||(parent[expando]={});
cache=outerCache[type]||[];
nodeIndex=cache[0]===dirruns&&cache[1];
diff=nodeIndex&&cache[2];
node=nodeIndex&&parent.childNodes[nodeIndex];
while((node=++nodeIndex&&node&&node[dir]||
(diff=nodeIndex=0)||start.pop())){
if(node.nodeType===1&&++diff&&node===elem){
outerCache[type]=[dirruns,nodeIndex,diff];
break;
}
}
}else{
if(useCache){
outerCache=elem[expando]||(elem[expando]={});
cache=outerCache[type]||[];
nodeIndex=cache[0]===dirruns&&cache[1];
diff=nodeIndex;
}
if(diff===false){
while((node=++nodeIndex&&node&&node[dir]||
(diff=nodeIndex=0)||start.pop())){
if((ofType?
nodeName(node,name):
node.nodeType===1)&&
++diff){
if(useCache){
outerCache=node[expando]||
(node[expando]={});
outerCache[type]=[dirruns,diff];
}
if(node===elem){
break;
}
}
}
}
}
diff-=last;
return diff===first||(diff%first===0&&diff/first>=0);
}
};
},
PSEUDO:function(pseudo,argument){
var args,
fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||
find.error("unsupported pseudo: "+pseudo);
if(fn[expando]){
return fn(argument);
}
if(fn.length>1){
args=[pseudo,pseudo,"",argument];
return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?
markFunction(function(seed,matches){
var idx,
matched=fn(seed,argument),
i=matched.length;
while(i--){
idx=indexOf.call(seed,matched[i]);
seed[idx]=!(matches[idx]=matched[i]);
}
}):
function(elem){
return fn(elem,0,args);
};
}
return fn;
}
},
pseudos:{
not:markFunction(function(selector){
var input=[],
results=[],
matcher=compile(selector.replace(rtrimCSS,"$1"));
return matcher[expando]?
markFunction(function(seed,matches,_context,xml){
var elem,
unmatched=matcher(seed,null,xml,[]),
i=seed.length;
while(i--){
if((elem=unmatched[i])){
seed[i]=!(matches[i]=elem);
}
}
}):
function(elem,_context,xml){
input[0]=elem;
matcher(input,null,xml,results);
input[0]=null;
return!results.pop();
};
}),
has:markFunction(function(selector){
return function(elem){
return find(selector,elem).length>0;
};
}),
contains:markFunction(function(text){
text=text.replace(runescape,funescape);
return function(elem){
return(elem.textContent||jQuery.text(elem)).indexOf(text)>-1;
};
}),
lang:markFunction(function(lang){
if(!ridentifier.test(lang||"")){
find.error("unsupported lang: "+lang);
}
lang=lang.replace(runescape,funescape).toLowerCase();
return function(elem){
var elemLang;
do{
if((elemLang=documentIsHTML?
elem.lang:
elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){
elemLang=elemLang.toLowerCase();
return elemLang===lang||elemLang.indexOf(lang+"-")===0;
}
}while((elem=elem.parentNode)&&elem.nodeType===1);
return false;
};
}),
target:function(elem){
var hash=window.location&&window.location.hash;
return hash&&hash.slice(1)===elem.id;
},
root:function(elem){
return elem===documentElement;
},
focus:function(elem){
return elem===safeActiveElement()&&
document.hasFocus()&&
!!(elem.type||elem.href||~elem.tabIndex);
},
enabled:createDisabledPseudo(false),
disabled:createDisabledPseudo(true),
checked:function(elem){
return(nodeName(elem,"input")&&!!elem.checked)||
(nodeName(elem,"option")&&!!elem.selected);
},
selected:function(elem){
if(elem.parentNode){
elem.parentNode.selectedIndex;
}
return elem.selected===true;
},
empty:function(elem){
for(elem=elem.firstChild;elem;elem=elem.nextSibling){
if(elem.nodeType<6){
return false;
}
}
return true;
},
parent:function(elem){
return!Expr.pseudos.empty(elem);
},
header:function(elem){
return rheader.test(elem.nodeName);
},
input:function(elem){
return rinputs.test(elem.nodeName);
},
button:function(elem){
return nodeName(elem,"input")&&elem.type==="button"||
nodeName(elem,"button");
},
text:function(elem){
var attr;
return nodeName(elem,"input")&&elem.type==="text"&&
((attr=elem.getAttribute("type"))==null||
attr.toLowerCase()==="text");
},
first:createPositionalPseudo(function(){
return[0];
}),
last:createPositionalPseudo(function(_matchIndexes,length){
return[length-1];
}),
eq:createPositionalPseudo(function(_matchIndexes,length,argument){
return[argument<0?argument+length:argument];
}),
even:createPositionalPseudo(function(matchIndexes,length){
var i=0;
for(;i<length;i+=2){
matchIndexes.push(i);
}
return matchIndexes;
}),
odd:createPositionalPseudo(function(matchIndexes,length){
var i=1;
for(;i<length;i+=2){
matchIndexes.push(i);
}
return matchIndexes;
}),
lt:createPositionalPseudo(function(matchIndexes,length,argument){
var i;
if(argument<0){
i=argument+length;
}else if(argument>length){
i=length;
}else{
i=argument;
}
for(;--i>=0;){
matchIndexes.push(i);
}
return matchIndexes;
}),
gt:createPositionalPseudo(function(matchIndexes,length,argument){
var i=argument<0?argument+length:argument;
for(;++i<length;){
matchIndexes.push(i);
}
return matchIndexes;
})
}
};
Expr.pseudos.nth=Expr.pseudos.eq;
for(i in{radio:true,checkbox:true,file:true,password:true,image:true}){
Expr.pseudos[i]=createInputPseudo(i);
}
for(i in{submit:true,reset:true}){
Expr.pseudos[i]=createButtonPseudo(i);
}
function setFilters(){}
setFilters.prototype=Expr.filters=Expr.pseudos;
Expr.setFilters=new setFilters();
function tokenize(selector,parseOnly){
var matched,match,tokens,type,
soFar,groups,preFilters,
cached=tokenCache[selector+" "];
if(cached){
return parseOnly?0:cached.slice(0);
}
soFar=selector;
groups=[];
preFilters=Expr.preFilter;
while(soFar){
if(!matched||(match=rcomma.exec(soFar))){
if(match){
soFar=soFar.slice(match[0].length)||soFar;
}
groups.push((tokens=[]));
}
matched=false;
if((match=rleadingCombinator.exec(soFar))){
matched=match.shift();
tokens.push({
value:matched,
type:match[0].replace(rtrimCSS," ")
});
soFar=soFar.slice(matched.length);
}
for(type in Expr.filter){
if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||
(match=preFilters[type](match)))){
matched=match.shift();
tokens.push({
value:matched,
type:type,
matches:match
});
soFar=soFar.slice(matched.length);
}
}
if(!matched){
break;
}
}
if(parseOnly){
return soFar.length;
}
return soFar?
find.error(selector):
tokenCache(selector,groups).slice(0);
}
function toSelector(tokens){
var i=0,
len=tokens.length,
selector="";
for(;i<len;i++){
selector+=tokens[i].value;
}
return selector;
}
function addCombinator(matcher,combinator,base){
var dir=combinator.dir,
skip=combinator.next,
key=skip||dir,
checkNonElements=base&&key==="parentNode",
doneName=done++;
return combinator.first?
function(elem,context,xml){
while((elem=elem[dir])){
if(elem.nodeType===1||checkNonElements){
return matcher(elem,context,xml);
}
}
return false;
}:
function(elem,context,xml){
var oldCache,outerCache,
newCache=[dirruns,doneName];
if(xml){
while((elem=elem[dir])){
if(elem.nodeType===1||checkNonElements){
if(matcher(elem,context,xml)){
return true;
}
}
}
}else{
while((elem=elem[dir])){
if(elem.nodeType===1||checkNonElements){
outerCache=elem[expando]||(elem[expando]={});
if(skip&&nodeName(elem,skip)){
elem=elem[dir]||elem;
}else if((oldCache=outerCache[key])&&
oldCache[0]===dirruns&&oldCache[1]===doneName){
return(newCache[2]=oldCache[2]);
}else{
outerCache[key]=newCache;
if((newCache[2]=matcher(elem,context,xml))){
return true;
}
}
}
}
}
return false;
};
}
function elementMatcher(matchers){
return matchers.length>1?
function(elem,context,xml){
var i=matchers.length;
while(i--){
if(!matchers[i](elem,context,xml)){
return false;
}
}
return true;
}:
matchers[0];
}
function multipleContexts(selector,contexts,results){
var i=0,
len=contexts.length;
for(;i<len;i++){
find(selector,contexts[i],results);
}
return results;
}
function condense(unmatched,map,filter,context,xml){
var elem,
newUnmatched=[],
i=0,
len=unmatched.length,
mapped=map!=null;
for(;i<len;i++){
if((elem=unmatched[i])){
if(!filter||filter(elem,context,xml)){
newUnmatched.push(elem);
if(mapped){
map.push(i);
}
}
}
}
return newUnmatched;
}
function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){
if(postFilter&&!postFilter[expando]){
postFilter=setMatcher(postFilter);
}
if(postFinder&&!postFinder[expando]){
postFinder=setMatcher(postFinder,postSelector);
}
return markFunction(function(seed,results,context,xml){
var temp,i,elem,matcherOut,
preMap=[],
postMap=[],
preexisting=results.length,
elems=seed||
multipleContexts(selector||"*",
context.nodeType?[context]:context,[]),
matcherIn=preFilter&&(seed||!selector)?
condense(elems,preMap,preFilter,context,xml):
elems;
if(matcher){
matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?
[]:
results;
matcher(matcherIn,matcherOut,context,xml);
}else{
matcherOut=matcherIn;
}
if(postFilter){
temp=condense(matcherOut,postMap);
postFilter(temp,[],context,xml);
i=temp.length;
while(i--){
if((elem=temp[i])){
matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);
}
}
}
if(seed){
if(postFinder||preFilter){
if(postFinder){
temp=[];
i=matcherOut.length;
while(i--){
if((elem=matcherOut[i])){
temp.push((matcherIn[i]=elem));
}
}
postFinder(null,(matcherOut=[]),temp,xml);
}
i=matcherOut.length;
while(i--){
if((elem=matcherOut[i])&&
(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){
seed[temp]=!(results[temp]=elem);
}
}
}
}else{
matcherOut=condense(
matcherOut===results?
matcherOut.splice(preexisting,matcherOut.length):
matcherOut
);
if(postFinder){
postFinder(null,results,matcherOut,xml);
}else{
push.apply(results,matcherOut);
}
}
});
}
function matcherFromTokens(tokens){
var checkContext,matcher,j,
len=tokens.length,
leadingRelative=Expr.relative[tokens[0].type],
implicitRelative=leadingRelative||Expr.relative[" "],
i=leadingRelative?1:0,
matchContext=addCombinator(function(elem){
return elem===checkContext;
},implicitRelative,true),
matchAnyContext=addCombinator(function(elem){
return indexOf.call(checkContext,elem)>-1;
},implicitRelative,true),
matchers=[function(elem,context,xml){
var ret=(!leadingRelative&&(xml||context!=outermostContext))||(
(checkContext=context).nodeType?
matchContext(elem,context,xml):
matchAnyContext(elem,context,xml));
checkContext=null;
return ret;
}];
for(;i<len;i++){
if((matcher=Expr.relative[tokens[i].type])){
matchers=[addCombinator(elementMatcher(matchers),matcher)];
}else{
matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);
if(matcher[expando]){
j=++i;
for(;j<len;j++){
if(Expr.relative[tokens[j].type]){
break;
}
}
return setMatcher(
i>1&&elementMatcher(matchers),
i>1&&toSelector(
tokens.slice(0,i-1)
.concat({value:tokens[i-2].type===" "?"*":""})
).replace(rtrimCSS,"$1"),
matcher,
i<j&&matcherFromTokens(tokens.slice(i,j)),
j<len&&matcherFromTokens((tokens=tokens.slice(j))),
j<len&&toSelector(tokens)
);
}
matchers.push(matcher);
}
}
return elementMatcher(matchers);
}
function matcherFromGroupMatchers(elementMatchers,setMatchers){
var bySet=setMatchers.length>0,
byElement=elementMatchers.length>0,
superMatcher=function(seed,context,xml,results,outermost){
var elem,j,matcher,
matchedCount=0,
i="0",
unmatched=seed&&[],
setMatched=[],
contextBackup=outermostContext,
elems=seed||byElement&&Expr.find.TAG("*",outermost),
dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),
len=elems.length;
if(outermost){
outermostContext=context==document||context||outermost;
}
for(;i!==len&&(elem=elems[i])!=null;i++){
if(byElement&&elem){
j=0;
if(!context&&elem.ownerDocument!=document){
setDocument(elem);
xml=!documentIsHTML;
}
while((matcher=elementMatchers[j++])){
if(matcher(elem,context||document,xml)){
push.call(results,elem);
break;
}
}
if(outermost){
dirruns=dirrunsUnique;
}
}
if(bySet){
if((elem=!matcher&&elem)){
matchedCount--;
}
if(seed){
unmatched.push(elem);
}
}
}
matchedCount+=i;
if(bySet&&i!==matchedCount){
j=0;
while((matcher=setMatchers[j++])){
matcher(unmatched,setMatched,context,xml);
}
if(seed){
if(matchedCount>0){
while(i--){
if(!(unmatched[i]||setMatched[i])){
setMatched[i]=pop.call(results);
}
}
}
setMatched=condense(setMatched);
}
push.apply(results,setMatched);
if(outermost&&!seed&&setMatched.length>0&&
(matchedCount+setMatchers.length)>1){
jQuery.uniqueSort(results);
}
}
if(outermost){
dirruns=dirrunsUnique;
outermostContext=contextBackup;
}
return unmatched;
};
return bySet?
markFunction(superMatcher):
superMatcher;
}
function compile(selector,match){
var i,
setMatchers=[],
elementMatchers=[],
cached=compilerCache[selector+" "];
if(!cached){
if(!match){
match=tokenize(selector);
}
i=match.length;
while(i--){
cached=matcherFromTokens(match[i]);
if(cached[expando]){
setMatchers.push(cached);
}else{
elementMatchers.push(cached);
}
}
cached=compilerCache(selector,
matcherFromGroupMatchers(elementMatchers,setMatchers));
cached.selector=selector;
}
return cached;
}
function select(selector,context,results,seed){
var i,tokens,token,type,find,
compiled=typeof selector==="function"&&selector,
match=!seed&&tokenize((selector=compiled.selector||selector));
results=results||[];
if(match.length===1){
tokens=match[0]=match[0].slice(0);
if(tokens.length>2&&(token=tokens[0]).type==="ID"&&
context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){
context=(Expr.find.ID(
token.matches[0].replace(runescape,funescape),
context
)||[])[0];
if(!context){
return results;
}else if(compiled){
context=context.parentNode;
}
selector=selector.slice(tokens.shift().value.length);
}
i=matchExpr.needsContext.test(selector)?0:tokens.length;
while(i--){
token=tokens[i];
if(Expr.relative[(type=token.type)]){
break;
}
if((find=Expr.find[type])){
if((seed=find(
token.matches[0].replace(runescape,funescape),
rsibling.test(tokens[0].type)&&
testContext(context.parentNode)||context
))){
tokens.splice(i,1);
selector=seed.length&&toSelector(tokens);
if(!selector){
push.apply(results,seed);
return results;
}
break;
}
}
}
}
(compiled||compile(selector,match))(
seed,
context,
!documentIsHTML,
results,
!context||rsibling.test(selector)&&testContext(context.parentNode)||context
);
return results;
}
support.sortStable=expando.split("").sort(sortOrder).join("")===expando;
setDocument();
support.sortDetached=assert(function(el){
return el.compareDocumentPosition(document.createElement("fieldset"))&1;
});
jQuery.find=find;
jQuery.expr[":"]=jQuery.expr.pseudos;
jQuery.unique=jQuery.uniqueSort;
find.compile=compile;
find.select=select;
find.setDocument=setDocument;
find.tokenize=tokenize;
find.escape=jQuery.escapeSelector;
find.getText=jQuery.text;
find.isXML=jQuery.isXMLDoc;
find.selectors=jQuery.expr;
find.support=jQuery.support;
find.uniqueSort=jQuery.uniqueSort;
})();
var dir=function(elem,dir,until){
var matched=[],
truncate=until!==undefined;
while((elem=elem[dir])&&elem.nodeType!==9){
if(elem.nodeType===1){
if(truncate&&jQuery(elem).is(until)){
break;
}
matched.push(elem);
}
}
return matched;
};
var siblings=function(n,elem){
var matched=[];
for(;n;n=n.nextSibling){
if(n.nodeType===1&&n!==elem){
matched.push(n);
}
}
return matched;
};
var rneedsContext=jQuery.expr.match.needsContext;
var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);
function winnow(elements,qualifier,not){
if(isFunction(qualifier)){
return jQuery.grep(elements,function(elem,i){
return!!qualifier.call(elem,i,elem)!==not;
});
}
if(qualifier.nodeType){
return jQuery.grep(elements,function(elem){
return(elem===qualifier)!==not;
});
}
if(typeof qualifier!=="string"){
return jQuery.grep(elements,function(elem){
return(indexOf.call(qualifier,elem)>-1)!==not;
});
}
return jQuery.filter(qualifier,elements,not);
}
jQuery.filter=function(expr,elems,not){
var elem=elems[0];
if(not){
expr=":not("+expr+")";
}
if(elems.length===1&&elem.nodeType===1){
return jQuery.find.matchesSelector(elem,expr)?[elem]:[];
}
return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){
return elem.nodeType===1;
}));
};
jQuery.fn.extend({
find:function(selector){
var i,ret,
len=this.length,
self=this;
if(typeof selector!=="string"){
return this.pushStack(jQuery(selector).filter(function(){
for(i=0;i<len;i++){
if(jQuery.contains(self[i],this)){
return true;
}
}
}));
}
ret=this.pushStack([]);
for(i=0;i<len;i++){
jQuery.find(selector,self[i],ret);
}
return len>1?jQuery.uniqueSort(ret):ret;
},
filter:function(selector){
return this.pushStack(winnow(this,selector||[],false));
},
not:function(selector){
return this.pushStack(winnow(this,selector||[],true));
},
is:function(selector){
return!!winnow(
this,
typeof selector==="string"&&rneedsContext.test(selector)?
jQuery(selector):
selector||[],
false
).length;
}
});
var rootjQuery,
rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
init=jQuery.fn.init=function(selector,context,root){
var match,elem;
if(!selector){
return this;
}
root=root||rootjQuery;
if(typeof selector==="string"){
if(selector[0]==="<"&&
selector[selector.length-1]===">"&&
selector.length>=3){
match=[null,selector,null];
}else{
match=rquickExpr.exec(selector);
}
if(match&&(match[1]||!context)){
if(match[1]){
context=context instanceof jQuery?context[0]:context;
jQuery.merge(this,jQuery.parseHTML(
match[1],
context&&context.nodeType?context.ownerDocument||context:document,
true
));
if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){
for(match in context){
if(isFunction(this[match])){
this[match](context[match]);
}else{
this.attr(match,context[match]);
}
}
}
return this;
}else{
elem=document.getElementById(match[2]);
if(elem){
this[0]=elem;
this.length=1;
}
return this;
}
}else if(!context||context.jquery){
return(context||root).find(selector);
}else{
return this.constructor(context).find(selector);
}
}else if(selector.nodeType){
this[0]=selector;
this.length=1;
return this;
}else if(isFunction(selector)){
return root.ready!==undefined?
root.ready(selector):
selector(jQuery);
}
return jQuery.makeArray(selector,this);
};
init.prototype=jQuery.fn;
rootjQuery=jQuery(document);
var rparentsprev=/^(?:parents|prev(?:Until|All))/,
guaranteedUnique={
children:true,
contents:true,
next:true,
prev:true
};
jQuery.fn.extend({
has:function(target){
var targets=jQuery(target,this),
l=targets.length;
return this.filter(function(){
var i=0;
for(;i<l;i++){
if(jQuery.contains(this,targets[i])){
return true;
}
}
});
},
closest:function(selectors,context){
var cur,
i=0,
l=this.length,
matched=[],
targets=typeof selectors!=="string"&&jQuery(selectors);
if(!rneedsContext.test(selectors)){
for(;i<l;i++){
for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){
if(cur.nodeType<11&&(targets?
targets.index(cur)>-1:
cur.nodeType===1&&
jQuery.find.matchesSelector(cur,selectors))){
matched.push(cur);
break;
}
}
}
}
return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);
},
index:function(elem){
if(!elem){
return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;
}
if(typeof elem==="string"){
return indexOf.call(jQuery(elem),this[0]);
}
return indexOf.call(this,
elem.jquery?elem[0]:elem
);
},
add:function(selector,context){
return this.pushStack(
jQuery.uniqueSort(
jQuery.merge(this.get(),jQuery(selector,context))
)
);
},
addBack:function(selector){
return this.add(selector==null?
this.prevObject:this.prevObject.filter(selector)
);
}
});
function sibling(cur,dir){
while((cur=cur[dir])&&cur.nodeType!==1){}
return cur;
}
jQuery.each({
parent:function(elem){
var parent=elem.parentNode;
return parent&&parent.nodeType!==11?parent:null;
},
parents:function(elem){
return dir(elem,"parentNode");
},
parentsUntil:function(elem,_i,until){
return dir(elem,"parentNode",until);
},
next:function(elem){
return sibling(elem,"nextSibling");
},
prev:function(elem){
return sibling(elem,"previousSibling");
},
nextAll:function(elem){
return dir(elem,"nextSibling");
},
prevAll:function(elem){
return dir(elem,"previousSibling");
},
nextUntil:function(elem,_i,until){
return dir(elem,"nextSibling",until);
},
prevUntil:function(elem,_i,until){
return dir(elem,"previousSibling",until);
},
siblings:function(elem){
return siblings((elem.parentNode||{}).firstChild,elem);
},
children:function(elem){
return siblings(elem.firstChild);
},
contents:function(elem){
if(elem.contentDocument!=null&&
getProto(elem.contentDocument)){
return elem.contentDocument;
}
if(nodeName(elem,"template")){
elem=elem.content||elem;
}
return jQuery.merge([],elem.childNodes);
}
},function(name,fn){
jQuery.fn[name]=function(until,selector){
var matched=jQuery.map(this,fn,until);
if(name.slice(-5)!=="Until"){
selector=until;
}
if(selector&&typeof selector==="string"){
matched=jQuery.filter(selector,matched);
}
if(this.length>1){
if(!guaranteedUnique[name]){
jQuery.uniqueSort(matched);
}
if(rparentsprev.test(name)){
matched.reverse();
}
}
return this.pushStack(matched);
};
});
var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);
function createOptions(options){
var object={};
jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){
object[flag]=true;
});
return object;
}
jQuery.Callbacks=function(options){
options=typeof options==="string"?
createOptions(options):
jQuery.extend({},options);
var
firing,
memory,
fired,
locked,
list=[],
queue=[],
firingIndex=-1,
fire=function(){
locked=locked||options.once;
fired=firing=true;
for(;queue.length;firingIndex=-1){
memory=queue.shift();
while(++firingIndex<list.length){
if(list[firingIndex].apply(memory[0],memory[1])===false&&
options.stopOnFalse){
firingIndex=list.length;
memory=false;
}
}
}
if(!options.memory){
memory=false;
}
firing=false;
if(locked){
if(memory){
list=[];
}else{
list="";
}
}
},
self={
add:function(){
if(list){
if(memory&&!firing){
firingIndex=list.length-1;
queue.push(memory);
}
(function add(args){
jQuery.each(args,function(_,arg){
if(isFunction(arg)){
if(!options.unique||!self.has(arg)){
list.push(arg);
}
}else if(arg&&arg.length&&toType(arg)!=="string"){
add(arg);
}
});
})(arguments);
if(memory&&!firing){
fire();
}
}
return this;
},
remove:function(){
jQuery.each(arguments,function(_,arg){
var index;
while((index=jQuery.inArray(arg,list,index))>-1){
list.splice(index,1);
if(index<=firingIndex){
firingIndex--;
}
}
});
return this;
},
has:function(fn){
return fn?
jQuery.inArray(fn,list)>-1:
list.length>0;
},
empty:function(){
if(list){
list=[];
}
return this;
},
disable:function(){
locked=queue=[];
list=memory="";
return this;
},
disabled:function(){
return!list;
},
lock:function(){
locked=queue=[];
if(!memory&&!firing){
list=memory="";
}
return this;
},
locked:function(){
return!!locked;
},
fireWith:function(context,args){
if(!locked){
args=args||[];
args=[context,args.slice?args.slice():args];
queue.push(args);
if(!firing){
fire();
}
}
return this;
},
fire:function(){
self.fireWith(this,arguments);
return this;
},
fired:function(){
return!!fired;
}
};
return self;
};
function Identity(v){
return v;
}
function Thrower(ex){
throw ex;
}
function adoptValue(value,resolve,reject,noValue){
var method;
try{
if(value&&isFunction((method=value.promise))){
method.call(value).done(resolve).fail(reject);
}else if(value&&isFunction((method=value.then))){
method.call(value,resolve,reject);
}else{
resolve.apply(undefined,[value].slice(noValue));
}
}catch(value){
reject.apply(undefined,[value]);
}
}
jQuery.extend({
Deferred:function(func){
var tuples=[
["notify","progress",jQuery.Callbacks("memory"),
jQuery.Callbacks("memory"),2],
["resolve","done",jQuery.Callbacks("once memory"),
jQuery.Callbacks("once memory"),0,"resolved"],
["reject","fail",jQuery.Callbacks("once memory"),
jQuery.Callbacks("once memory"),1,"rejected"]
],
state="pending",
promise={
state:function(){
return state;
},
always:function(){
deferred.done(arguments).fail(arguments);
return this;
},
"catch":function(fn){
return promise.then(null,fn);
},
pipe:function(){
var fns=arguments;
return jQuery.Deferred(function(newDefer){
jQuery.each(tuples,function(_i,tuple){
var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];
deferred[tuple[1]](function(){
var returned=fn&&fn.apply(this,arguments);
if(returned&&isFunction(returned.promise)){
returned.promise()
.progress(newDefer.notify)
.done(newDefer.resolve)
.fail(newDefer.reject);
}else{
newDefer[tuple[0]+"With"](
this,
fn?[returned]:arguments
);
}
});
});
fns=null;
}).promise();
},
then:function(onFulfilled,onRejected,onProgress){
var maxDepth=0;
function resolve(depth,deferred,handler,special){
return function(){
var that=this,
args=arguments,
mightThrow=function(){
var returned,then;
if(depth<maxDepth){
return;
}
returned=handler.apply(that,args);
if(returned===deferred.promise()){
throw new TypeError("Thenable self-resolution");
}
then=returned&&
(typeof returned==="object"||
typeof returned==="function")&&
returned.then;
if(isFunction(then)){
if(special){
then.call(
returned,
resolve(maxDepth,deferred,Identity,special),
resolve(maxDepth,deferred,Thrower,special)
);
}else{
maxDepth++;
then.call(
returned,
resolve(maxDepth,deferred,Identity,special),
resolve(maxDepth,deferred,Thrower,special),
resolve(maxDepth,deferred,Identity,
deferred.notifyWith)
);
}
}else{
if(handler!==Identity){
that=undefined;
args=[returned];
}
(special||deferred.resolveWith)(that,args);
}
},
process=special?
mightThrow:
function(){
try{
mightThrow();
}catch(e){
if(jQuery.Deferred.exceptionHook){
jQuery.Deferred.exceptionHook(e,
process.error);
}
if(depth+1>=maxDepth){
if(handler!==Thrower){
that=undefined;
args=[e];
}
deferred.rejectWith(that,args);
}
}
};
if(depth){
process();
}else{
if(jQuery.Deferred.getErrorHook){
process.error=jQuery.Deferred.getErrorHook();
}else if(jQuery.Deferred.getStackHook){
process.error=jQuery.Deferred.getStackHook();
}
window.setTimeout(process);
}
};
}
return jQuery.Deferred(function(newDefer){
tuples[0][3].add(
resolve(
0,
newDefer,
isFunction(onProgress)?
onProgress:
Identity,
newDefer.notifyWith
)
);
tuples[1][3].add(
resolve(
0,
newDefer,
isFunction(onFulfilled)?
onFulfilled:
Identity
)
);
tuples[2][3].add(
resolve(
0,
newDefer,
isFunction(onRejected)?
onRejected:
Thrower
)
);
}).promise();
},
promise:function(obj){
return obj!=null?jQuery.extend(obj,promise):promise;
}
},
deferred={};
jQuery.each(tuples,function(i,tuple){
var list=tuple[2],
stateString=tuple[5];
promise[tuple[1]]=list.add;
if(stateString){
list.add(
function(){
state=stateString;
},
tuples[3-i][2].disable,
tuples[3-i][3].disable,
tuples[0][2].lock,
tuples[0][3].lock
);
}
list.add(tuple[3].fire);
deferred[tuple[0]]=function(){
deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);
return this;
};
deferred[tuple[0]+"With"]=list.fireWith;
});
promise.promise(deferred);
if(func){
func.call(deferred,deferred);
}
return deferred;
},
when:function(singleValue){
var
remaining=arguments.length,
i=remaining,
resolveContexts=Array(i),
resolveValues=slice.call(arguments),
primary=jQuery.Deferred(),
updateFunc=function(i){
return function(value){
resolveContexts[i]=this;
resolveValues[i]=arguments.length>1?slice.call(arguments):value;
if(!(--remaining)){
primary.resolveWith(resolveContexts,resolveValues);
}
};
};
if(remaining<=1){
adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,
!remaining);
if(primary.state()==="pending"||
isFunction(resolveValues[i]&&resolveValues[i].then)){
return primary.then();
}
}
while(i--){
adoptValue(resolveValues[i],updateFunc(i),primary.reject);
}
return primary.promise();
}
});
var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
jQuery.Deferred.exceptionHook=function(error,asyncError){
if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){
window.console.warn("jQuery.Deferred exception: "+error.message,
error.stack,asyncError);
}
};
jQuery.readyException=function(error){
window.setTimeout(function(){
throw error;
});
};
var readyList=jQuery.Deferred();
jQuery.fn.ready=function(fn){
readyList
.then(fn)
.catch(function(error){
jQuery.readyException(error);
});
return this;
};
jQuery.extend({
isReady:false,
readyWait:1,
ready:function(wait){
if(wait===true?--jQuery.readyWait:jQuery.isReady){
return;
}
jQuery.isReady=true;
if(wait!==true&&--jQuery.readyWait>0){
return;
}
readyList.resolveWith(document,[jQuery]);
}
});
jQuery.ready.then=readyList.then;
function completed(){
document.removeEventListener("DOMContentLoaded",completed);
window.removeEventListener("load",completed);
jQuery.ready();
}
if(document.readyState==="complete"||
(document.readyState!=="loading"&&!document.documentElement.doScroll)){
window.setTimeout(jQuery.ready);
}else{
document.addEventListener("DOMContentLoaded",completed);
window.addEventListener("load",completed);
}
var access=function(elems,fn,key,value,chainable,emptyGet,raw){
var i=0,
len=elems.length,
bulk=key==null;
if(toType(key)==="object"){
chainable=true;
for(i in key){
access(elems,fn,i,key[i],true,emptyGet,raw);
}
}else if(value!==undefined){
chainable=true;
if(!isFunction(value)){
raw=true;
}
if(bulk){
if(raw){
fn.call(elems,value);
fn=null;
}else{
bulk=fn;
fn=function(elem,_key,value){
return bulk.call(jQuery(elem),value);
};
}
}
if(fn){
for(;i<len;i++){
fn(
elems[i],key,raw?
value:
value.call(elems[i],i,fn(elems[i],key))
);
}
}
}
if(chainable){
return elems;
}
if(bulk){
return fn.call(elems);
}
return len?fn(elems[0],key):emptyGet;
};
var rmsPrefix=/^-ms-/,
rdashAlpha=/-([a-z])/g;
function fcamelCase(_all,letter){
return letter.toUpperCase();
}
function camelCase(string){
return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);
}
var acceptData=function(owner){
return owner.nodeType===1||owner.nodeType===9||!(+owner.nodeType);
};
function Data(){
this.expando=jQuery.expando+Data.uid++;
}
Data.uid=1;
Data.prototype={
cache:function(owner){
var value=owner[this.expando];
if(!value){
value={};
if(acceptData(owner)){
if(owner.nodeType){
owner[this.expando]=value;
}else{
Object.defineProperty(owner,this.expando,{
value:value,
configurable:true
});
}
}
}
return value;
},
set:function(owner,data,value){
var prop,
cache=this.cache(owner);
if(typeof data==="string"){
cache[camelCase(data)]=value;
}else{
for(prop in data){
cache[camelCase(prop)]=data[prop];
}
}
return cache;
},
get:function(owner,key){
return key===undefined?
this.cache(owner):
owner[this.expando]&&owner[this.expando][camelCase(key)];
},
access:function(owner,key,value){
if(key===undefined||
((key&&typeof key==="string")&&value===undefined)){
return this.get(owner,key);
}
this.set(owner,key,value);
return value!==undefined?value:key;
},
remove:function(owner,key){
var i,
cache=owner[this.expando];
if(cache===undefined){
return;
}
if(key!==undefined){
if(Array.isArray(key)){
key=key.map(camelCase);
}else{
key=camelCase(key);
key=key in cache?
[key]:
(key.match(rnothtmlwhite)||[]);
}
i=key.length;
while(i--){
delete cache[key[i]];
}
}
if(key===undefined||jQuery.isEmptyObject(cache)){
if(owner.nodeType){
owner[this.expando]=undefined;
}else{
delete owner[this.expando];
}
}
},
hasData:function(owner){
var cache=owner[this.expando];
return cache!==undefined&&!jQuery.isEmptyObject(cache);
}
};
var dataPriv=new Data();
var dataUser=new Data();
var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
rmultiDash=/[A-Z]/g;
function getData(data){
if(data==="true"){
return true;
}
if(data==="false"){
return false;
}
if(data==="null"){
return null;
}
if(data===+data+""){
return+data;
}
if(rbrace.test(data)){
return JSON.parse(data);
}
return data;
}
function dataAttr(elem,key,data){
var name;
if(data===undefined&&elem.nodeType===1){
name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();
data=elem.getAttribute(name);
if(typeof data==="string"){
try{
data=getData(data);
}catch(e){}
dataUser.set(elem,key,data);
}else{
data=undefined;
}
}
return data;
}
jQuery.extend({
hasData:function(elem){
return dataUser.hasData(elem)||dataPriv.hasData(elem);
},
data:function(elem,name,data){
return dataUser.access(elem,name,data);
},
removeData:function(elem,name){
dataUser.remove(elem,name);
},
_data:function(elem,name,data){
return dataPriv.access(elem,name,data);
},
_removeData:function(elem,name){
dataPriv.remove(elem,name);
}
});
jQuery.fn.extend({
data:function(key,value){
var i,name,data,
elem=this[0],
attrs=elem&&elem.attributes;
if(key===undefined){
if(this.length){
data=dataUser.get(elem);
if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){
i=attrs.length;
while(i--){
if(attrs[i]){
name=attrs[i].name;
if(name.indexOf("data-")===0){
name=camelCase(name.slice(5));
dataAttr(elem,name,data[name]);
}
}
}
dataPriv.set(elem,"hasDataAttrs",true);
}
}
return data;
}
if(typeof key==="object"){
return this.each(function(){
dataUser.set(this,key);
});
}
return access(this,function(value){
var data;
if(elem&&value===undefined){
data=dataUser.get(elem,key);
if(data!==undefined){
return data;
}
data=dataAttr(elem,key);
if(data!==undefined){
return data;
}
return;
}
this.each(function(){
dataUser.set(this,key,value);
});
},null,value,arguments.length>1,null,true);
},
removeData:function(key){
return this.each(function(){
dataUser.remove(this,key);
});
}
});
jQuery.extend({
queue:function(elem,type,data){
var queue;
if(elem){
type=(type||"fx")+"queue";
queue=dataPriv.get(elem,type);
if(data){
if(!queue||Array.isArray(data)){
queue=dataPriv.access(elem,type,jQuery.makeArray(data));
}else{
queue.push(data);
}
}
return queue||[];
}
},
dequeue:function(elem,type){
type=type||"fx";
var queue=jQuery.queue(elem,type),
startLength=queue.length,
fn=queue.shift(),
hooks=jQuery._queueHooks(elem,type),
next=function(){
jQuery.dequeue(elem,type);
};
if(fn==="inprogress"){
fn=queue.shift();
startLength--;
}
if(fn){
if(type==="fx"){
queue.unshift("inprogress");
}
delete hooks.stop;
fn.call(elem,next,hooks);
}
if(!startLength&&hooks){
hooks.empty.fire();
}
},
_queueHooks:function(elem,type){
var key=type+"queueHooks";
return dataPriv.get(elem,key)||dataPriv.access(elem,key,{
empty:jQuery.Callbacks("once memory").add(function(){
dataPriv.remove(elem,[type+"queue",key]);
})
});
}
});
jQuery.fn.extend({
queue:function(type,data){
var setter=2;
if(typeof type!=="string"){
data=type;
type="fx";
setter--;
}
if(arguments.length<setter){
return jQuery.queue(this[0],type);
}
return data===undefined?
this:
this.each(function(){
var queue=jQuery.queue(this,type,data);
jQuery._queueHooks(this,type);
if(type==="fx"&&queue[0]!=="inprogress"){
jQuery.dequeue(this,type);
}
});
},
dequeue:function(type){
return this.each(function(){
jQuery.dequeue(this,type);
});
},
clearQueue:function(type){
return this.queue(type||"fx",[]);
},
promise:function(type,obj){
var tmp,
count=1,
defer=jQuery.Deferred(),
elements=this,
i=this.length,
resolve=function(){
if(!(--count)){
defer.resolveWith(elements,[elements]);
}
};
if(typeof type!=="string"){
obj=type;
type=undefined;
}
type=type||"fx";
while(i--){
tmp=dataPriv.get(elements[i],type+"queueHooks");
if(tmp&&tmp.empty){
count++;
tmp.empty.add(resolve);
}
}
resolve();
return defer.promise(obj);
}
});
var pnum=(/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");
var cssExpand=["Top","Right","Bottom","Left"];
var documentElement=document.documentElement;
var isAttached=function(elem){
return jQuery.contains(elem.ownerDocument,elem);
},
composed={composed:true};
if(documentElement.getRootNode){
isAttached=function(elem){
return jQuery.contains(elem.ownerDocument,elem)||
elem.getRootNode(composed)===elem.ownerDocument;
};
}
var isHiddenWithinTree=function(elem,el){
elem=el||elem;
return elem.style.display==="none"||
elem.style.display===""&&
isAttached(elem)&&
jQuery.css(elem,"display")==="none";
};
function adjustCSS(elem,prop,valueParts,tween){
var adjusted,scale,
maxIterations=20,
currentValue=tween?
function(){
return tween.cur();
}:
function(){
return jQuery.css(elem,prop,"");
},
initial=currentValue(),
unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),
initialInUnit=elem.nodeType&&
(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&
rcssNum.exec(jQuery.css(elem,prop));
if(initialInUnit&&initialInUnit[3]!==unit){
initial=initial/2;
unit=unit||initialInUnit[3];
initialInUnit=+initial||1;
while(maxIterations--){
jQuery.style(elem,prop,initialInUnit+unit);
if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){
maxIterations=0;
}
initialInUnit=initialInUnit/scale;
}
initialInUnit=initialInUnit*2;
jQuery.style(elem,prop,initialInUnit+unit);
valueParts=valueParts||[];
}
if(valueParts){
initialInUnit=+initialInUnit||+initial||0;
adjusted=valueParts[1]?
initialInUnit+(valueParts[1]+1)*valueParts[2]:
+valueParts[2];
if(tween){
tween.unit=unit;
tween.start=initialInUnit;
tween.end=adjusted;
}
}
return adjusted;
}
var defaultDisplayMap={};
function getDefaultDisplay(elem){
var temp,
doc=elem.ownerDocument,
nodeName=elem.nodeName,
display=defaultDisplayMap[nodeName];
if(display){
return display;
}
temp=doc.body.appendChild(doc.createElement(nodeName));
display=jQuery.css(temp,"display");
temp.parentNode.removeChild(temp);
if(display==="none"){
display="block";
}
defaultDisplayMap[nodeName]=display;
return display;
}
function showHide(elements,show){
var display,elem,
values=[],
index=0,
length=elements.length;
for(;index<length;index++){
elem=elements[index];
if(!elem.style){
continue;
}
display=elem.style.display;
if(show){
if(display==="none"){
values[index]=dataPriv.get(elem,"display")||null;
if(!values[index]){
elem.style.display="";
}
}
if(elem.style.display===""&&isHiddenWithinTree(elem)){
values[index]=getDefaultDisplay(elem);
}
}else{
if(display!=="none"){
values[index]="none";
dataPriv.set(elem,"display",display);
}
}
}
for(index=0;index<length;index++){
if(values[index]!=null){
elements[index].style.display=values[index];
}
}
return elements;
}
jQuery.fn.extend({
show:function(){
return showHide(this,true);
},
hide:function(){
return showHide(this);
},
toggle:function(state){
if(typeof state==="boolean"){
return state?this.show():this.hide();
}
return this.each(function(){
if(isHiddenWithinTree(this)){
jQuery(this).show();
}else{
jQuery(this).hide();
}
});
}
});
var rcheckableType=(/^(?:checkbox|radio)$/i);
var rtagName=(/<([a-z][^\/\0>\x20\t\r\n\f]*)/i);
var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);
(function(){
var fragment=document.createDocumentFragment(),
div=fragment.appendChild(document.createElement("div")),
input=document.createElement("input");
input.setAttribute("type","radio");
input.setAttribute("checked","checked");
input.setAttribute("name","t");
div.appendChild(input);
support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;
div.innerHTML="<textarea>x</textarea>";
support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;
div.innerHTML="<option></option>";
support.option=!!div.lastChild;
})();
var wrapMap={
thead:[1,"<table>","</table>"],
col:[2,"<table><colgroup>","</colgroup></table>"],
tr:[2,"<table><tbody>","</tbody></table>"],
td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
_default:[0,"",""]
};
wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;
wrapMap.th=wrapMap.td;
if(!support.option){
wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"];
}
function getAll(context,tag){
var ret;
if(typeof context.getElementsByTagName!=="undefined"){
ret=context.getElementsByTagName(tag||"*");
}else if(typeof context.querySelectorAll!=="undefined"){
ret=context.querySelectorAll(tag||"*");
}else{
ret=[];
}
if(tag===undefined||tag&&nodeName(context,tag)){
return jQuery.merge([context],ret);
}
return ret;
}
function setGlobalEval(elems,refElements){
var i=0,
l=elems.length;
for(;i<l;i++){
dataPriv.set(
elems[i],
"globalEval",
!refElements||dataPriv.get(refElements[i],"globalEval")
);
}
}
var rhtml=/<|&#?\w+;/;
function buildFragment(elems,context,scripts,selection,ignored){
var elem,tmp,tag,wrap,attached,j,
fragment=context.createDocumentFragment(),
nodes=[],
i=0,
l=elems.length;
for(;i<l;i++){
elem=elems[i];
if(elem||elem===0){
if(toType(elem)==="object"){
jQuery.merge(nodes,elem.nodeType?[elem]:elem);
}else if(!rhtml.test(elem)){
nodes.push(context.createTextNode(elem));
}else{
tmp=tmp||fragment.appendChild(context.createElement("div"));
tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();
wrap=wrapMap[tag]||wrapMap._default;
tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];
j=wrap[0];
while(j--){
tmp=tmp.lastChild;
}
jQuery.merge(nodes,tmp.childNodes);
tmp=fragment.firstChild;
tmp.textContent="";
}
}
}
fragment.textContent="";
i=0;
while((elem=nodes[i++])){
if(selection&&jQuery.inArray(elem,selection)>-1){
if(ignored){
ignored.push(elem);
}
continue;
}
attached=isAttached(elem);
tmp=getAll(fragment.appendChild(elem),"script");
if(attached){
setGlobalEval(tmp);
}
if(scripts){
j=0;
while((elem=tmp[j++])){
if(rscriptType.test(elem.type||"")){
scripts.push(elem);
}
}
}
}
return fragment;
}
var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;
function returnTrue(){
return true;
}
function returnFalse(){
return false;
}
function on(elem,types,selector,data,fn,one){
var origFn,type;
if(typeof types==="object"){
if(typeof selector!=="string"){
data=data||selector;
selector=undefined;
}
for(type in types){
on(elem,type,selector,data,types[type],one);
}
return elem;
}
if(data==null&&fn==null){
fn=selector;
data=selector=undefined;
}else if(fn==null){
if(typeof selector==="string"){
fn=data;
data=undefined;
}else{
fn=data;
data=selector;
selector=undefined;
}
}
if(fn===false){
fn=returnFalse;
}else if(!fn){
return elem;
}
if(one===1){
origFn=fn;
fn=function(event){
jQuery().off(event);
return origFn.apply(this,arguments);
};
fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);
}
return elem.each(function(){
jQuery.event.add(this,types,fn,data,selector);
});
}
jQuery.event={
global:{},
add:function(elem,types,handler,data,selector){
var handleObjIn,eventHandle,tmp,
events,t,handleObj,
special,handlers,type,namespaces,origType,
elemData=dataPriv.get(elem);
if(!acceptData(elem)){
return;
}
if(handler.handler){
handleObjIn=handler;
handler=handleObjIn.handler;
selector=handleObjIn.selector;
}
if(selector){
jQuery.find.matchesSelector(documentElement,selector);
}
if(!handler.guid){
handler.guid=jQuery.guid++;
}
if(!(events=elemData.events)){
events=elemData.events=Object.create(null);
}
if(!(eventHandle=elemData.handle)){
eventHandle=elemData.handle=function(e){
return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?
jQuery.event.dispatch.apply(elem,arguments):undefined;
};
}
types=(types||"").match(rnothtmlwhite)||[""];
t=types.length;
while(t--){
tmp=rtypenamespace.exec(types[t])||[];
type=origType=tmp[1];
namespaces=(tmp[2]||"").split(".").sort();
if(!type){
continue;
}
special=jQuery.event.special[type]||{};
type=(selector?special.delegateType:special.bindType)||type;
special=jQuery.event.special[type]||{};
handleObj=jQuery.extend({
type:type,
origType:origType,
data:data,
handler:handler,
guid:handler.guid,
selector:selector,
needsContext:selector&&jQuery.expr.match.needsContext.test(selector),
namespace:namespaces.join(".")
},handleObjIn);
if(!(handlers=events[type])){
handlers=events[type]=[];
handlers.delegateCount=0;
if(!special.setup||
special.setup.call(elem,data,namespaces,eventHandle)===false){
if(elem.addEventListener){
elem.addEventListener(type,eventHandle);
}
}
}
if(special.add){
special.add.call(elem,handleObj);
if(!handleObj.handler.guid){
handleObj.handler.guid=handler.guid;
}
}
if(selector){
handlers.splice(handlers.delegateCount++,0,handleObj);
}else{
handlers.push(handleObj);
}
jQuery.event.global[type]=true;
}
},
remove:function(elem,types,handler,selector,mappedTypes){
var j,origCount,tmp,
events,t,handleObj,
special,handlers,type,namespaces,origType,
elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);
if(!elemData||!(events=elemData.events)){
return;
}
types=(types||"").match(rnothtmlwhite)||[""];
t=types.length;
while(t--){
tmp=rtypenamespace.exec(types[t])||[];
type=origType=tmp[1];
namespaces=(tmp[2]||"").split(".").sort();
if(!type){
for(type in events){
jQuery.event.remove(elem,type+types[t],handler,selector,true);
}
continue;
}
special=jQuery.event.special[type]||{};
type=(selector?special.delegateType:special.bindType)||type;
handlers=events[type]||[];
tmp=tmp[2]&&
new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");
origCount=j=handlers.length;
while(j--){
handleObj=handlers[j];
if((mappedTypes||origType===handleObj.origType)&&
(!handler||handler.guid===handleObj.guid)&&
(!tmp||tmp.test(handleObj.namespace))&&
(!selector||selector===handleObj.selector||
selector==="**"&&handleObj.selector)){
handlers.splice(j,1);
if(handleObj.selector){
handlers.delegateCount--;
}
if(special.remove){
special.remove.call(elem,handleObj);
}
}
}
if(origCount&&!handlers.length){
if(!special.teardown||
special.teardown.call(elem,namespaces,elemData.handle)===false){
jQuery.removeEvent(elem,type,elemData.handle);
}
delete events[type];
}
}
if(jQuery.isEmptyObject(events)){
dataPriv.remove(elem,"handle events");
}
},
dispatch:function(nativeEvent){
var i,j,ret,matched,handleObj,handlerQueue,
args=new Array(arguments.length),
event=jQuery.event.fix(nativeEvent),
handlers=(
dataPriv.get(this,"events")||Object.create(null)
)[event.type]||[],
special=jQuery.event.special[event.type]||{};
args[0]=event;
for(i=1;i<arguments.length;i++){
args[i]=arguments[i];
}
event.delegateTarget=this;
if(special.preDispatch&&special.preDispatch.call(this,event)===false){
return;
}
handlerQueue=jQuery.event.handlers.call(this,event,handlers);
i=0;
while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){
event.currentTarget=matched.elem;
j=0;
while((handleObj=matched.handlers[j++])&&
!event.isImmediatePropagationStopped()){
if(!event.rnamespace||handleObj.namespace===false||
event.rnamespace.test(handleObj.namespace)){
event.handleObj=handleObj;
event.data=handleObj.data;
ret=((jQuery.event.special[handleObj.origType]||{}).handle||
handleObj.handler).apply(matched.elem,args);
if(ret!==undefined){
if((event.result=ret)===false){
event.preventDefault();
event.stopPropagation();
}
}
}
}
}
if(special.postDispatch){
special.postDispatch.call(this,event);
}
return event.result;
},
handlers:function(event,handlers){
var i,handleObj,sel,matchedHandlers,matchedSelectors,
handlerQueue=[],
delegateCount=handlers.delegateCount,
cur=event.target;
if(delegateCount&&
cur.nodeType&&
!(event.type==="click"&&event.button>=1)){
for(;cur!==this;cur=cur.parentNode||this){
if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){
matchedHandlers=[];
matchedSelectors={};
for(i=0;i<delegateCount;i++){
handleObj=handlers[i];
sel=handleObj.selector+" ";
if(matchedSelectors[sel]===undefined){
matchedSelectors[sel]=handleObj.needsContext?
jQuery(sel,this).index(cur)>-1:
jQuery.find(sel,this,null,[cur]).length;
}
if(matchedSelectors[sel]){
matchedHandlers.push(handleObj);
}
}
if(matchedHandlers.length){
handlerQueue.push({elem:cur,handlers:matchedHandlers});
}
}
}
}
cur=this;
if(delegateCount<handlers.length){
handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)});
}
return handlerQueue;
},
addProp:function(name,hook){
Object.defineProperty(jQuery.Event.prototype,name,{
enumerable:true,
configurable:true,
get:isFunction(hook)?
function(){
if(this.originalEvent){
return hook(this.originalEvent);
}
}:
function(){
if(this.originalEvent){
return this.originalEvent[name];
}
},
set:function(value){
Object.defineProperty(this,name,{
enumerable:true,
configurable:true,
writable:true,
value:value
});
}
});
},
fix:function(originalEvent){
return originalEvent[jQuery.expando]?
originalEvent:
new jQuery.Event(originalEvent);
},
special:{
load:{
noBubble:true
},
click:{
setup:function(data){
var el=this||data;
if(rcheckableType.test(el.type)&&
el.click&&nodeName(el,"input")){
leverageNative(el,"click",true);
}
return false;
},
trigger:function(data){
var el=this||data;
if(rcheckableType.test(el.type)&&
el.click&&nodeName(el,"input")){
leverageNative(el,"click");
}
return true;
},
_default:function(event){
var target=event.target;
return rcheckableType.test(target.type)&&
target.click&&nodeName(target,"input")&&
dataPriv.get(target,"click")||
nodeName(target,"a");
}
},
beforeunload:{
postDispatch:function(event){
if(event.result!==undefined&&event.originalEvent){
event.originalEvent.returnValue=event.result;
}
}
}
}
};
function leverageNative(el,type,isSetup){
if(!isSetup){
if(dataPriv.get(el,type)===undefined){
jQuery.event.add(el,type,returnTrue);
}
return;
}
dataPriv.set(el,type,false);
jQuery.event.add(el,type,{
namespace:false,
handler:function(event){
var result,
saved=dataPriv.get(this,type);
if((event.isTrigger&1)&&this[type]){
if(!saved){
saved=slice.call(arguments);
dataPriv.set(this,type,saved);
this[type]();
result=dataPriv.get(this,type);
dataPriv.set(this,type,false);
if(saved!==result){
event.stopImmediatePropagation();
event.preventDefault();
return result;
}
}else if((jQuery.event.special[type]||{}).delegateType){
event.stopPropagation();
}
}else if(saved){
dataPriv.set(this,type,jQuery.event.trigger(
saved[0],
saved.slice(1),
this
));
event.stopPropagation();
event.isImmediatePropagationStopped=returnTrue;
}
}
});
}
jQuery.removeEvent=function(elem,type,handle){
if(elem.removeEventListener){
elem.removeEventListener(type,handle);
}
};
jQuery.Event=function(src,props){
if(!(this instanceof jQuery.Event)){
return new jQuery.Event(src,props);
}
if(src&&src.type){
this.originalEvent=src;
this.type=src.type;
this.isDefaultPrevented=src.defaultPrevented||
src.defaultPrevented===undefined&&
src.returnValue===false?
returnTrue:
returnFalse;
this.target=(src.target&&src.target.nodeType===3)?
src.target.parentNode:
src.target;
this.currentTarget=src.currentTarget;
this.relatedTarget=src.relatedTarget;
}else{
this.type=src;
}
if(props){
jQuery.extend(this,props);
}
this.timeStamp=src&&src.timeStamp||Date.now();
this[jQuery.expando]=true;
};
jQuery.Event.prototype={
constructor:jQuery.Event,
isDefaultPrevented:returnFalse,
isPropagationStopped:returnFalse,
isImmediatePropagationStopped:returnFalse,
isSimulated:false,
preventDefault:function(){
var e=this.originalEvent;
this.isDefaultPrevented=returnTrue;
if(e&&!this.isSimulated){
e.preventDefault();
}
},
stopPropagation:function(){
var e=this.originalEvent;
this.isPropagationStopped=returnTrue;
if(e&&!this.isSimulated){
e.stopPropagation();
}
},
stopImmediatePropagation:function(){
var e=this.originalEvent;
this.isImmediatePropagationStopped=returnTrue;
if(e&&!this.isSimulated){
e.stopImmediatePropagation();
}
this.stopPropagation();
}
};
jQuery.each({
altKey:true,
bubbles:true,
cancelable:true,
changedTouches:true,
ctrlKey:true,
detail:true,
eventPhase:true,
metaKey:true,
pageX:true,
pageY:true,
shiftKey:true,
view:true,
"char":true,
code:true,
charCode:true,
key:true,
keyCode:true,
button:true,
buttons:true,
clientX:true,
clientY:true,
offsetX:true,
offsetY:true,
pointerId:true,
pointerType:true,
screenX:true,
screenY:true,
targetTouches:true,
toElement:true,
touches:true,
which:true
},jQuery.event.addProp);
jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){
function focusMappedHandler(nativeEvent){
if(document.documentMode){
var handle=dataPriv.get(this,"handle"),
event=jQuery.event.fix(nativeEvent);
event.type=nativeEvent.type==="focusin"?"focus":"blur";
event.isSimulated=true;
handle(nativeEvent);
if(event.target===event.currentTarget){
handle(event);
}
}else{
jQuery.event.simulate(delegateType,nativeEvent.target,
jQuery.event.fix(nativeEvent));
}
}
jQuery.event.special[type]={
setup:function(){
var attaches;
leverageNative(this,type,true);
if(document.documentMode){
attaches=dataPriv.get(this,delegateType);
if(!attaches){
this.addEventListener(delegateType,focusMappedHandler);
}
dataPriv.set(this,delegateType,(attaches||0)+1);
}else{
return false;
}
},
trigger:function(){
leverageNative(this,type);
return true;
},
teardown:function(){
var attaches;
if(document.documentMode){
attaches=dataPriv.get(this,delegateType)-1;
if(!attaches){
this.removeEventListener(delegateType,focusMappedHandler);
dataPriv.remove(this,delegateType);
}else{
dataPriv.set(this,delegateType,attaches);
}
}else{
return false;
}
},
_default:function(event){
return dataPriv.get(event.target,type);
},
delegateType:delegateType
};
jQuery.event.special[delegateType]={
setup:function(){
var doc=this.ownerDocument||this.document||this,
dataHolder=document.documentMode?this:doc,
attaches=dataPriv.get(dataHolder,delegateType);
if(!attaches){
if(document.documentMode){
this.addEventListener(delegateType,focusMappedHandler);
}else{
doc.addEventListener(type,focusMappedHandler,true);
}
}
dataPriv.set(dataHolder,delegateType,(attaches||0)+1);
},
teardown:function(){
var doc=this.ownerDocument||this.document||this,
dataHolder=document.documentMode?this:doc,
attaches=dataPriv.get(dataHolder,delegateType)-1;
if(!attaches){
if(document.documentMode){
this.removeEventListener(delegateType,focusMappedHandler);
}else{
doc.removeEventListener(type,focusMappedHandler,true);
}
dataPriv.remove(dataHolder,delegateType);
}else{
dataPriv.set(dataHolder,delegateType,attaches);
}
}
};
});
jQuery.each({
mouseenter:"mouseover",
mouseleave:"mouseout",
pointerenter:"pointerover",
pointerleave:"pointerout"
},function(orig,fix){
jQuery.event.special[orig]={
delegateType:fix,
bindType:fix,
handle:function(event){
var ret,
target=this,
related=event.relatedTarget,
handleObj=event.handleObj;
if(!related||(related!==target&&!jQuery.contains(target,related))){
event.type=handleObj.origType;
ret=handleObj.handler.apply(this,arguments);
event.type=fix;
}
return ret;
}
};
});
jQuery.fn.extend({
on:function(types,selector,data,fn){
return on(this,types,selector,data,fn);
},
one:function(types,selector,data,fn){
return on(this,types,selector,data,fn,1);
},
off:function(types,selector,fn){
var handleObj,type;
if(types&&types.preventDefault&&types.handleObj){
handleObj=types.handleObj;
jQuery(types.delegateTarget).off(
handleObj.namespace?
handleObj.origType+"."+handleObj.namespace:
handleObj.origType,
handleObj.selector,
handleObj.handler
);
return this;
}
if(typeof types==="object"){
for(type in types){
this.off(type,selector,types[type]);
}
return this;
}
if(selector===false||typeof selector==="function"){
fn=selector;
selector=undefined;
}
if(fn===false){
fn=returnFalse;
}
return this.each(function(){
jQuery.event.remove(this,types,fn,selector);
});
}
});
var
rnoInnerhtml=/<script|<style|<link/i,
rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,
rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;
function manipulationTarget(elem,content){
if(nodeName(elem,"table")&&
nodeName(content.nodeType!==11?content:content.firstChild,"tr")){
return jQuery(elem).children("tbody")[0]||elem;
}
return elem;
}
function disableScript(elem){
elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;
return elem;
}
function restoreScript(elem){
if((elem.type||"").slice(0,5)==="true/"){
elem.type=elem.type.slice(5);
}else{
elem.removeAttribute("type");
}
return elem;
}
function cloneCopyEvent(src,dest){
var i,l,type,pdataOld,udataOld,udataCur,events;
if(dest.nodeType!==1){
return;
}
if(dataPriv.hasData(src)){
pdataOld=dataPriv.get(src);
events=pdataOld.events;
if(events){
dataPriv.remove(dest,"handle events");
for(type in events){
for(i=0,l=events[type].length;i<l;i++){
jQuery.event.add(dest,type,events[type][i]);
}
}
}
}
if(dataUser.hasData(src)){
udataOld=dataUser.access(src);
udataCur=jQuery.extend({},udataOld);
dataUser.set(dest,udataCur);
}
}
function fixInput(src,dest){
var nodeName=dest.nodeName.toLowerCase();
if(nodeName==="input"&&rcheckableType.test(src.type)){
dest.checked=src.checked;
}else if(nodeName==="input"||nodeName==="textarea"){
dest.defaultValue=src.defaultValue;
}
}
function domManip(collection,args,callback,ignored){
args=flat(args);
var fragment,first,scripts,hasScripts,node,doc,
i=0,
l=collection.length,
iNoClone=l-1,
value=args[0],
valueIsFunction=isFunction(value);
if(valueIsFunction||
(l>1&&typeof value==="string"&&
!support.checkClone&&rchecked.test(value))){
return collection.each(function(index){
var self=collection.eq(index);
if(valueIsFunction){
args[0]=value.call(this,index,self.html());
}
domManip(self,args,callback,ignored);
});
}
if(l){
fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);
first=fragment.firstChild;
if(fragment.childNodes.length===1){
fragment=first;
}
if(first||ignored){
scripts=jQuery.map(getAll(fragment,"script"),disableScript);
hasScripts=scripts.length;
for(;i<l;i++){
node=fragment;
if(i!==iNoClone){
node=jQuery.clone(node,true,true);
if(hasScripts){
jQuery.merge(scripts,getAll(node,"script"));
}
}
callback.call(collection[i],node,i);
}
if(hasScripts){
doc=scripts[scripts.length-1].ownerDocument;
jQuery.map(scripts,restoreScript);
for(i=0;i<hasScripts;i++){
node=scripts[i];
if(rscriptType.test(node.type||"")&&
!dataPriv.access(node,"globalEval")&&
jQuery.contains(doc,node)){
if(node.src&&(node.type||"").toLowerCase()!=="module"){
if(jQuery._evalUrl&&!node.noModule){
jQuery._evalUrl(node.src,{
nonce:node.nonce||node.getAttribute("nonce")
},doc);
}
}else{
DOMEval(node.textContent.replace(rcleanScript,""),node,doc);
}
}
}
}
}
}
return collection;
}
function remove(elem,selector,keepData){
var node,
nodes=selector?jQuery.filter(selector,elem):elem,
i=0;
for(;(node=nodes[i])!=null;i++){
if(!keepData&&node.nodeType===1){
jQuery.cleanData(getAll(node));
}
if(node.parentNode){
if(keepData&&isAttached(node)){
setGlobalEval(getAll(node,"script"));
}
node.parentNode.removeChild(node);
}
}
return elem;
}
jQuery.extend({
htmlPrefilter:function(html){
return html;
},
clone:function(elem,dataAndEvents,deepDataAndEvents){
var i,l,srcElements,destElements,
clone=elem.cloneNode(true),
inPage=isAttached(elem);
if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&
!jQuery.isXMLDoc(elem)){
destElements=getAll(clone);
srcElements=getAll(elem);
for(i=0,l=srcElements.length;i<l;i++){
fixInput(srcElements[i],destElements[i]);
}
}
if(dataAndEvents){
if(deepDataAndEvents){
srcElements=srcElements||getAll(elem);
destElements=destElements||getAll(clone);
for(i=0,l=srcElements.length;i<l;i++){
cloneCopyEvent(srcElements[i],destElements[i]);
}
}else{
cloneCopyEvent(elem,clone);
}
}
destElements=getAll(clone,"script");
if(destElements.length>0){
setGlobalEval(destElements,!inPage&&getAll(elem,"script"));
}
return clone;
},
cleanData:function(elems){
var data,elem,type,
special=jQuery.event.special,
i=0;
for(;(elem=elems[i])!==undefined;i++){
if(acceptData(elem)){
if((data=elem[dataPriv.expando])){
if(data.events){
for(type in data.events){
if(special[type]){
jQuery.event.remove(elem,type);
}else{
jQuery.removeEvent(elem,type,data.handle);
}
}
}
elem[dataPriv.expando]=undefined;
}
if(elem[dataUser.expando]){
elem[dataUser.expando]=undefined;
}
}
}
}
});
jQuery.fn.extend({
detach:function(selector){
return remove(this,selector,true);
},
remove:function(selector){
return remove(this,selector);
},
text:function(value){
return access(this,function(value){
return value===undefined?
jQuery.text(this):
this.empty().each(function(){
if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
this.textContent=value;
}
});
},null,value,arguments.length);
},
append:function(){
return domManip(this,arguments,function(elem){
if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
var target=manipulationTarget(this,elem);
target.appendChild(elem);
}
});
},
prepend:function(){
return domManip(this,arguments,function(elem){
if(this.nodeType===1||this.nodeType===11||this.nodeType===9){
var target=manipulationTarget(this,elem);
target.insertBefore(elem,target.firstChild);
}
});
},
before:function(){
return domManip(this,arguments,function(elem){
if(this.parentNode){
this.parentNode.insertBefore(elem,this);
}
});
},
after:function(){
return domManip(this,arguments,function(elem){
if(this.parentNode){
this.parentNode.insertBefore(elem,this.nextSibling);
}
});
},
empty:function(){
var elem,
i=0;
for(;(elem=this[i])!=null;i++){
if(elem.nodeType===1){
jQuery.cleanData(getAll(elem,false));
elem.textContent="";
}
}
return this;
},
clone:function(dataAndEvents,deepDataAndEvents){
dataAndEvents=dataAndEvents==null?false:dataAndEvents;
deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;
return this.map(function(){
return jQuery.clone(this,dataAndEvents,deepDataAndEvents);
});
},
html:function(value){
return access(this,function(value){
var elem=this[0]||{},
i=0,
l=this.length;
if(value===undefined&&elem.nodeType===1){
return elem.innerHTML;
}
if(typeof value==="string"&&!rnoInnerhtml.test(value)&&
!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){
value=jQuery.htmlPrefilter(value);
try{
for(;i<l;i++){
elem=this[i]||{};
if(elem.nodeType===1){
jQuery.cleanData(getAll(elem,false));
elem.innerHTML=value;
}
}
elem=0;
}catch(e){}
}
if(elem){
this.empty().append(value);
}
},null,value,arguments.length);
},
replaceWith:function(){
var ignored=[];
return domManip(this,arguments,function(elem){
var parent=this.parentNode;
if(jQuery.inArray(this,ignored)<0){
jQuery.cleanData(getAll(this));
if(parent){
parent.replaceChild(elem,this);
}
}
},ignored);
}
});
jQuery.each({
appendTo:"append",
prependTo:"prepend",
insertBefore:"before",
insertAfter:"after",
replaceAll:"replaceWith"
},function(name,original){
jQuery.fn[name]=function(selector){
var elems,
ret=[],
insert=jQuery(selector),
last=insert.length-1,
i=0;
for(;i<=last;i++){
elems=i===last?this:this.clone(true);
jQuery(insert[i])[original](elems);
push.apply(ret,elems.get());
}
return this.pushStack(ret);
};
});
var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");
var rcustomProp=/^--/;
var getStyles=function(elem){
var view=elem.ownerDocument.defaultView;
if(!view||!view.opener){
view=window;
}
return view.getComputedStyle(elem);
};
var swap=function(elem,options,callback){
var ret,name,
old={};
for(name in options){
old[name]=elem.style[name];
elem.style[name]=options[name];
}
ret=callback.call(elem);
for(name in options){
elem.style[name]=old[name];
}
return ret;
};
var rboxStyle=new RegExp(cssExpand.join("|"),"i");
(function(){
function computeStyleTests(){
if(!div){
return;
}
container.style.cssText="position:absolute;left:-11111px;width:60px;"+
"margin-top:1px;padding:0;border:0";
div.style.cssText=
"position:relative;display:block;box-sizing:border-box;overflow:scroll;"+
"margin:auto;border:1px;padding:1px;"+
"width:60%;top:1%";
documentElement.appendChild(container).appendChild(div);
var divStyle=window.getComputedStyle(div);
pixelPositionVal=divStyle.top!=="1%";
reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;
div.style.right="60%";
pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;
boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;
div.style.position="absolute";
scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;
documentElement.removeChild(container);
div=null;
}
function roundPixelMeasures(measure){
return Math.round(parseFloat(measure));
}
var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,
reliableTrDimensionsVal,reliableMarginLeftVal,
container=document.createElement("div"),
div=document.createElement("div");
if(!div.style){
return;
}
div.style.backgroundClip="content-box";
div.cloneNode(true).style.backgroundClip="";
support.clearCloneStyle=div.style.backgroundClip==="content-box";
jQuery.extend(support,{
boxSizingReliable:function(){
computeStyleTests();
return boxSizingReliableVal;
},
pixelBoxStyles:function(){
computeStyleTests();
return pixelBoxStylesVal;
},
pixelPosition:function(){
computeStyleTests();
return pixelPositionVal;
},
reliableMarginLeft:function(){
computeStyleTests();
return reliableMarginLeftVal;
},
scrollboxSize:function(){
computeStyleTests();
return scrollboxSizeVal;
},
reliableTrDimensions:function(){
var table,tr,trChild,trStyle;
if(reliableTrDimensionsVal==null){
table=document.createElement("table");
tr=document.createElement("tr");
trChild=document.createElement("div");
table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";
tr.style.cssText="box-sizing:content-box;border:1px solid";
tr.style.height="1px";
trChild.style.height="9px";
trChild.style.display="block";
documentElement
.appendChild(table)
.appendChild(tr)
.appendChild(trChild);
trStyle=window.getComputedStyle(tr);
reliableTrDimensionsVal=(parseInt(trStyle.height,10)+
parseInt(trStyle.borderTopWidth,10)+
parseInt(trStyle.borderBottomWidth,10))===tr.offsetHeight;
documentElement.removeChild(table);
}
return reliableTrDimensionsVal;
}
});
})();
function curCSS(elem,name,computed){
var width,minWidth,maxWidth,ret,
isCustomProp=rcustomProp.test(name),
style=elem.style;
computed=computed||getStyles(elem);
if(computed){
ret=computed.getPropertyValue(name)||computed[name];
if(isCustomProp&&ret){
ret=ret.replace(rtrimCSS,"$1")||undefined;
}
if(ret===""&&!isAttached(elem)){
ret=jQuery.style(elem,name);
}
if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){
width=style.width;
minWidth=style.minWidth;
maxWidth=style.maxWidth;
style.minWidth=style.maxWidth=style.width=ret;
ret=computed.width;
style.width=width;
style.minWidth=minWidth;
style.maxWidth=maxWidth;
}
}
return ret!==undefined?
ret+"":
ret;
}
function addGetHookIf(conditionFn,hookFn){
return{
get:function(){
if(conditionFn()){
delete this.get;
return;
}
return(this.get=hookFn).apply(this,arguments);
}
};
}
var cssPrefixes=["Webkit","Moz","ms"],
emptyStyle=document.createElement("div").style,
vendorProps={};
function vendorPropName(name){
var capName=name[0].toUpperCase()+name.slice(1),
i=cssPrefixes.length;
while(i--){
name=cssPrefixes[i]+capName;
if(name in emptyStyle){
return name;
}
}
}
function finalPropName(name){
var final=jQuery.cssProps[name]||vendorProps[name];
if(final){
return final;
}
if(name in emptyStyle){
return name;
}
return vendorProps[name]=vendorPropName(name)||name;
}
var
rdisplayswap=/^(none|table(?!-c[ea]).+)/,
cssShow={position:"absolute",visibility:"hidden",display:"block"},
cssNormalTransform={
letterSpacing:"0",
fontWeight:"400"
};
function setPositiveNumber(_elem,value,subtract){
var matches=rcssNum.exec(value);
return matches?
Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):
value;
}
function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){
var i=dimension==="width"?1:0,
extra=0,
delta=0,
marginDelta=0;
if(box===(isBorderBox?"border":"content")){
return 0;
}
for(;i<4;i+=2){
if(box==="margin"){
marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles);
}
if(!isBorderBox){
delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
if(box!=="padding"){
delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
}else{
extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
}
}else{
if(box==="content"){
delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);
}
if(box!=="margin"){
delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);
}
}
}
if(!isBorderBox&&computedVal>=0){
delta+=Math.max(0,Math.ceil(
elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
computedVal-
delta-
extra-
0.5
))||0;
}
return delta+marginDelta;
}
function getWidthOrHeight(elem,dimension,extra){
var styles=getStyles(elem),
boxSizingNeeded=!support.boxSizingReliable()||extra,
isBorderBox=boxSizingNeeded&&
jQuery.css(elem,"boxSizing",false,styles)==="border-box",
valueIsBorderBox=isBorderBox,
val=curCSS(elem,dimension,styles),
offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);
if(rnumnonpx.test(val)){
if(!extra){
return val;
}
val="auto";
}
if((!support.boxSizingReliable()&&isBorderBox||
!support.reliableTrDimensions()&&nodeName(elem,"tr")||
val==="auto"||
!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&&
elem.getClientRects().length){
isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";
valueIsBorderBox=offsetProp in elem;
if(valueIsBorderBox){
val=elem[offsetProp];
}
}
val=parseFloat(val)||0;
return(val+
boxModelAdjustment(
elem,
dimension,
extra||(isBorderBox?"border":"content"),
valueIsBorderBox,
styles,
val
)
)+"px";
}
jQuery.extend({
cssHooks:{
opacity:{
get:function(elem,computed){
if(computed){
var ret=curCSS(elem,"opacity");
return ret===""?"1":ret;
}
}
}
},
cssNumber:{
animationIterationCount:true,
aspectRatio:true,
borderImageSlice:true,
columnCount:true,
flexGrow:true,
flexShrink:true,
fontWeight:true,
gridArea:true,
gridColumn:true,
gridColumnEnd:true,
gridColumnStart:true,
gridRow:true,
gridRowEnd:true,
gridRowStart:true,
lineHeight:true,
opacity:true,
order:true,
orphans:true,
scale:true,
widows:true,
zIndex:true,
zoom:true,
fillOpacity:true,
floodOpacity:true,
stopOpacity:true,
strokeMiterlimit:true,
strokeOpacity:true
},
cssProps:{},
style:function(elem,name,value,extra){
if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){
return;
}
var ret,type,hooks,
origName=camelCase(name),
isCustomProp=rcustomProp.test(name),
style=elem.style;
if(!isCustomProp){
name=finalPropName(origName);
}
hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
if(value!==undefined){
type=typeof value;
if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){
value=adjustCSS(elem,name,ret);
type="number";
}
if(value==null||value!==value){
return;
}
if(type==="number"&&!isCustomProp){
value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");
}
if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){
style[name]="inherit";
}
if(!hooks||!("set"in hooks)||
(value=hooks.set(elem,value,extra))!==undefined){
if(isCustomProp){
style.setProperty(name,value);
}else{
style[name]=value;
}
}
}else{
if(hooks&&"get"in hooks&&
(ret=hooks.get(elem,false,extra))!==undefined){
return ret;
}
return style[name];
}
},
css:function(elem,name,extra,styles){
var val,num,hooks,
origName=camelCase(name),
isCustomProp=rcustomProp.test(name);
if(!isCustomProp){
name=finalPropName(origName);
}
hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];
if(hooks&&"get"in hooks){
val=hooks.get(elem,true,extra);
}
if(val===undefined){
val=curCSS(elem,name,styles);
}
if(val==="normal"&&name in cssNormalTransform){
val=cssNormalTransform[name];
}
if(extra===""||extra){
num=parseFloat(val);
return extra===true||isFinite(num)?num||0:val;
}
return val;
}
});
jQuery.each(["height","width"],function(_i,dimension){
jQuery.cssHooks[dimension]={
get:function(elem,computed,extra){
if(computed){
return rdisplayswap.test(jQuery.css(elem,"display"))&&
(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?
swap(elem,cssShow,function(){
return getWidthOrHeight(elem,dimension,extra);
}):
getWidthOrHeight(elem,dimension,extra);
}
},
set:function(elem,value,extra){
var matches,
styles=getStyles(elem),
scrollboxSizeBuggy=!support.scrollboxSize()&&
styles.position==="absolute",
boxSizingNeeded=scrollboxSizeBuggy||extra,
isBorderBox=boxSizingNeeded&&
jQuery.css(elem,"boxSizing",false,styles)==="border-box",
subtract=extra?
boxModelAdjustment(
elem,
dimension,
extra,
isBorderBox,
styles
):
0;
if(isBorderBox&&scrollboxSizeBuggy){
subtract-=Math.ceil(
elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-
parseFloat(styles[dimension])-
boxModelAdjustment(elem,dimension,"border",false,styles)-
0.5
);
}
if(subtract&&(matches=rcssNum.exec(value))&&
(matches[3]||"px")!=="px"){
elem.style[dimension]=value;
value=jQuery.css(elem,dimension);
}
return setPositiveNumber(elem,value,subtract);
}
};
});
jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,
function(elem,computed){
if(computed){
return(parseFloat(curCSS(elem,"marginLeft"))||
elem.getBoundingClientRect().left-
swap(elem,{marginLeft:0},function(){
return elem.getBoundingClientRect().left;
})
)+"px";
}
}
);
jQuery.each({
margin:"",
padding:"",
border:"Width"
},function(prefix,suffix){
jQuery.cssHooks[prefix+suffix]={
expand:function(value){
var i=0,
expanded={},
parts=typeof value==="string"?value.split(" "):[value];
for(;i<4;i++){
expanded[prefix+cssExpand[i]+suffix]=
parts[i]||parts[i-2]||parts[0];
}
return expanded;
}
};
if(prefix!=="margin"){
jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;
}
});
jQuery.fn.extend({
css:function(name,value){
return access(this,function(elem,name,value){
var styles,len,
map={},
i=0;
if(Array.isArray(name)){
styles=getStyles(elem);
len=name.length;
for(;i<len;i++){
map[name[i]]=jQuery.css(elem,name[i],false,styles);
}
return map;
}
return value!==undefined?
jQuery.style(elem,name,value):
jQuery.css(elem,name);
},name,value,arguments.length>1);
}
});
function Tween(elem,options,prop,end,easing){
return new Tween.prototype.init(elem,options,prop,end,easing);
}
jQuery.Tween=Tween;
Tween.prototype={
constructor:Tween,
init:function(elem,options,prop,end,easing,unit){
this.elem=elem;
this.prop=prop;
this.easing=easing||jQuery.easing._default;
this.options=options;
this.start=this.now=this.cur();
this.end=end;
this.unit=unit||(jQuery.cssNumber[prop]?"":"px");
},
cur:function(){
var hooks=Tween.propHooks[this.prop];
return hooks&&hooks.get?
hooks.get(this):
Tween.propHooks._default.get(this);
},
run:function(percent){
var eased,
hooks=Tween.propHooks[this.prop];
if(this.options.duration){
this.pos=eased=jQuery.easing[this.easing](
percent,this.options.duration*percent,0,1,this.options.duration
);
}else{
this.pos=eased=percent;
}
this.now=(this.end-this.start)*eased+this.start;
if(this.options.step){
this.options.step.call(this.elem,this.now,this);
}
if(hooks&&hooks.set){
hooks.set(this);
}else{
Tween.propHooks._default.set(this);
}
return this;
}
};
Tween.prototype.init.prototype=Tween.prototype;
Tween.propHooks={
_default:{
get:function(tween){
var result;
if(tween.elem.nodeType!==1||
tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){
return tween.elem[tween.prop];
}
result=jQuery.css(tween.elem,tween.prop,"");
return!result||result==="auto"?0:result;
},
set:function(tween){
if(jQuery.fx.step[tween.prop]){
jQuery.fx.step[tween.prop](tween);
}else if(tween.elem.nodeType===1&&(
jQuery.cssHooks[tween.prop]||
tween.elem.style[finalPropName(tween.prop)]!=null)){
jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);
}else{
tween.elem[tween.prop]=tween.now;
}
}
}
};
Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={
set:function(tween){
if(tween.elem.nodeType&&tween.elem.parentNode){
tween.elem[tween.prop]=tween.now;
}
}
};
jQuery.easing={
linear:function(p){
return p;
},
swing:function(p){
return 0.5-Math.cos(p*Math.PI)/2;
},
_default:"swing"
};
jQuery.fx=Tween.prototype.init;
jQuery.fx.step={};
var
fxNow,inProgress,
rfxtypes=/^(?:toggle|show|hide)$/,
rrun=/queueHooks$/;
function schedule(){
if(inProgress){
if(document.hidden===false&&window.requestAnimationFrame){
window.requestAnimationFrame(schedule);
}else{
window.setTimeout(schedule,jQuery.fx.interval);
}
jQuery.fx.tick();
}
}
function createFxNow(){
window.setTimeout(function(){
fxNow=undefined;
});
return(fxNow=Date.now());
}
function genFx(type,includeWidth){
var which,
i=0,
attrs={height:type};
includeWidth=includeWidth?1:0;
for(;i<4;i+=2-includeWidth){
which=cssExpand[i];
attrs["margin"+which]=attrs["padding"+which]=type;
}
if(includeWidth){
attrs.opacity=attrs.width=type;
}
return attrs;
}
function createTween(value,prop,animation){
var tween,
collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),
index=0,
length=collection.length;
for(;index<length;index++){
if((tween=collection[index].call(animation,prop,value))){
return tween;
}
}
}
function defaultPrefilter(elem,props,opts){
var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,
isBox="width"in props||"height"in props,
anim=this,
orig={},
style=elem.style,
hidden=elem.nodeType&&isHiddenWithinTree(elem),
dataShow=dataPriv.get(elem,"fxshow");
if(!opts.queue){
hooks=jQuery._queueHooks(elem,"fx");
if(hooks.unqueued==null){
hooks.unqueued=0;
oldfire=hooks.empty.fire;
hooks.empty.fire=function(){
if(!hooks.unqueued){
oldfire();
}
};
}
hooks.unqueued++;
anim.always(function(){
anim.always(function(){
hooks.unqueued--;
if(!jQuery.queue(elem,"fx").length){
hooks.empty.fire();
}
});
});
}
for(prop in props){
value=props[prop];
if(rfxtypes.test(value)){
delete props[prop];
toggle=toggle||value==="toggle";
if(value===(hidden?"hide":"show")){
if(value==="show"&&dataShow&&dataShow[prop]!==undefined){
hidden=true;
}else{
continue;
}
}
orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);
}
}
propTween=!jQuery.isEmptyObject(props);
if(!propTween&&jQuery.isEmptyObject(orig)){
return;
}
if(isBox&&elem.nodeType===1){
opts.overflow=[style.overflow,style.overflowX,style.overflowY];
restoreDisplay=dataShow&&dataShow.display;
if(restoreDisplay==null){
restoreDisplay=dataPriv.get(elem,"display");
}
display=jQuery.css(elem,"display");
if(display==="none"){
if(restoreDisplay){
display=restoreDisplay;
}else{
showHide([elem],true);
restoreDisplay=elem.style.display||restoreDisplay;
display=jQuery.css(elem,"display");
showHide([elem]);
}
}
if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){
if(jQuery.css(elem,"float")==="none"){
if(!propTween){
anim.done(function(){
style.display=restoreDisplay;
});
if(restoreDisplay==null){
display=style.display;
restoreDisplay=display==="none"?"":display;
}
}
style.display="inline-block";
}
}
}
if(opts.overflow){
style.overflow="hidden";
anim.always(function(){
style.overflow=opts.overflow[0];
style.overflowX=opts.overflow[1];
style.overflowY=opts.overflow[2];
});
}
propTween=false;
for(prop in orig){
if(!propTween){
if(dataShow){
if("hidden"in dataShow){
hidden=dataShow.hidden;
}
}else{
dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});
}
if(toggle){
dataShow.hidden=!hidden;
}
if(hidden){
showHide([elem],true);
}
anim.done(function(){
if(!hidden){
showHide([elem]);
}
dataPriv.remove(elem,"fxshow");
for(prop in orig){
jQuery.style(elem,prop,orig[prop]);
}
});
}
propTween=createTween(hidden?dataShow[prop]:0,prop,anim);
if(!(prop in dataShow)){
dataShow[prop]=propTween.start;
if(hidden){
propTween.end=propTween.start;
propTween.start=0;
}
}
}
}
function propFilter(props,specialEasing){
var index,name,easing,value,hooks;
for(index in props){
name=camelCase(index);
easing=specialEasing[name];
value=props[index];
if(Array.isArray(value)){
easing=value[1];
value=props[index]=value[0];
}
if(index!==name){
props[name]=value;
delete props[index];
}
hooks=jQuery.cssHooks[name];
if(hooks&&"expand"in hooks){
value=hooks.expand(value);
delete props[name];
for(index in value){
if(!(index in props)){
props[index]=value[index];
specialEasing[index]=easing;
}
}
}else{
specialEasing[name]=easing;
}
}
}
function Animation(elem,properties,options){
var result,
stopped,
index=0,
length=Animation.prefilters.length,
deferred=jQuery.Deferred().always(function(){
delete tick.elem;
}),
tick=function(){
if(stopped){
return false;
}
var currentTime=fxNow||createFxNow(),
remaining=Math.max(0,animation.startTime+animation.duration-currentTime),
temp=remaining/animation.duration||0,
percent=1-temp,
index=0,
length=animation.tweens.length;
for(;index<length;index++){
animation.tweens[index].run(percent);
}
deferred.notifyWith(elem,[animation,percent,remaining]);
if(percent<1&&length){
return remaining;
}
if(!length){
deferred.notifyWith(elem,[animation,1,0]);
}
deferred.resolveWith(elem,[animation]);
return false;
},
animation=deferred.promise({
elem:elem,
props:jQuery.extend({},properties),
opts:jQuery.extend(true,{
specialEasing:{},
easing:jQuery.easing._default
},options),
originalProperties:properties,
originalOptions:options,
startTime:fxNow||createFxNow(),
duration:options.duration,
tweens:[],
createTween:function(prop,end){
var tween=jQuery.Tween(elem,animation.opts,prop,end,
animation.opts.specialEasing[prop]||animation.opts.easing);
animation.tweens.push(tween);
return tween;
},
stop:function(gotoEnd){
var index=0,
length=gotoEnd?animation.tweens.length:0;
if(stopped){
return this;
}
stopped=true;
for(;index<length;index++){
animation.tweens[index].run(1);
}
if(gotoEnd){
deferred.notifyWith(elem,[animation,1,0]);
deferred.resolveWith(elem,[animation,gotoEnd]);
}else{
deferred.rejectWith(elem,[animation,gotoEnd]);
}
return this;
}
}),
props=animation.props;
propFilter(props,animation.opts.specialEasing);
for(;index<length;index++){
result=Animation.prefilters[index].call(animation,elem,props,animation.opts);
if(result){
if(isFunction(result.stop)){
jQuery._queueHooks(animation.elem,animation.opts.queue).stop=
result.stop.bind(result);
}
return result;
}
}
jQuery.map(props,createTween,animation);
if(isFunction(animation.opts.start)){
animation.opts.start.call(elem,animation);
}
animation
.progress(animation.opts.progress)
.done(animation.opts.done,animation.opts.complete)
.fail(animation.opts.fail)
.always(animation.opts.always);
jQuery.fx.timer(
jQuery.extend(tick,{
elem:elem,
anim:animation,
queue:animation.opts.queue
})
);
return animation;
}
jQuery.Animation=jQuery.extend(Animation,{
tweeners:{
"*":[function(prop,value){
var tween=this.createTween(prop,value);
adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);
return tween;
}]
},
tweener:function(props,callback){
if(isFunction(props)){
callback=props;
props=["*"];
}else{
props=props.match(rnothtmlwhite);
}
var prop,
index=0,
length=props.length;
for(;index<length;index++){
prop=props[index];
Animation.tweeners[prop]=Animation.tweeners[prop]||[];
Animation.tweeners[prop].unshift(callback);
}
},
prefilters:[defaultPrefilter],
prefilter:function(callback,prepend){
if(prepend){
Animation.prefilters.unshift(callback);
}else{
Animation.prefilters.push(callback);
}
}
});
jQuery.speed=function(speed,easing,fn){
var opt=speed&&typeof speed==="object"?jQuery.extend({},speed):{
complete:fn||!fn&&easing||
isFunction(speed)&&speed,
duration:speed,
easing:fn&&easing||easing&&!isFunction(easing)&&easing
};
if(jQuery.fx.off){
opt.duration=0;
}else{
if(typeof opt.duration!=="number"){
if(opt.duration in jQuery.fx.speeds){
opt.duration=jQuery.fx.speeds[opt.duration];
}else{
opt.duration=jQuery.fx.speeds._default;
}
}
}
if(opt.queue==null||opt.queue===true){
opt.queue="fx";
}
opt.old=opt.complete;
opt.complete=function(){
if(isFunction(opt.old)){
opt.old.call(this);
}
if(opt.queue){
jQuery.dequeue(this,opt.queue);
}
};
return opt;
};
jQuery.fn.extend({
fadeTo:function(speed,to,easing,callback){
return this.filter(isHiddenWithinTree).css("opacity",0).show()
.end().animate({opacity:to},speed,easing,callback);
},
animate:function(prop,speed,easing,callback){
var empty=jQuery.isEmptyObject(prop),
optall=jQuery.speed(speed,easing,callback),
doAnimation=function(){
var anim=Animation(this,jQuery.extend({},prop),optall);
if(empty||dataPriv.get(this,"finish")){
anim.stop(true);
}
};
doAnimation.finish=doAnimation;
return empty||optall.queue===false?
this.each(doAnimation):
this.queue(optall.queue,doAnimation);
},
stop:function(type,clearQueue,gotoEnd){
var stopQueue=function(hooks){
var stop=hooks.stop;
delete hooks.stop;
stop(gotoEnd);
};
if(typeof type!=="string"){
gotoEnd=clearQueue;
clearQueue=type;
type=undefined;
}
if(clearQueue){
this.queue(type||"fx",[]);
}
return this.each(function(){
var dequeue=true,
index=type!=null&&type+"queueHooks",
timers=jQuery.timers,
data=dataPriv.get(this);
if(index){
if(data[index]&&data[index].stop){
stopQueue(data[index]);
}
}else{
for(index in data){
if(data[index]&&data[index].stop&&rrun.test(index)){
stopQueue(data[index]);
}
}
}
for(index=timers.length;index--;){
if(timers[index].elem===this&&
(type==null||timers[index].queue===type)){
timers[index].anim.stop(gotoEnd);
dequeue=false;
timers.splice(index,1);
}
}
if(dequeue||!gotoEnd){
jQuery.dequeue(this,type);
}
});
},
finish:function(type){
if(type!==false){
type=type||"fx";
}
return this.each(function(){
var index,
data=dataPriv.get(this),
queue=data[type+"queue"],
hooks=data[type+"queueHooks"],
timers=jQuery.timers,
length=queue?queue.length:0;
data.finish=true;
jQuery.queue(this,type,[]);
if(hooks&&hooks.stop){
hooks.stop.call(this,true);
}
for(index=timers.length;index--;){
if(timers[index].elem===this&&timers[index].queue===type){
timers[index].anim.stop(true);
timers.splice(index,1);
}
}
for(index=0;index<length;index++){
if(queue[index]&&queue[index].finish){
queue[index].finish.call(this);
}
}
delete data.finish;
});
}
});
jQuery.each(["toggle","show","hide"],function(_i,name){
var cssFn=jQuery.fn[name];
jQuery.fn[name]=function(speed,easing,callback){
return speed==null||typeof speed==="boolean"?
cssFn.apply(this,arguments):
this.animate(genFx(name,true),speed,easing,callback);
};
});
jQuery.each({
slideDown:genFx("show"),
slideUp:genFx("hide"),
slideToggle:genFx("toggle"),
fadeIn:{opacity:"show"},
fadeOut:{opacity:"hide"},
fadeToggle:{opacity:"toggle"}
},function(name,props){
jQuery.fn[name]=function(speed,easing,callback){
return this.animate(props,speed,easing,callback);
};
});
jQuery.timers=[];
jQuery.fx.tick=function(){
var timer,
i=0,
timers=jQuery.timers;
fxNow=Date.now();
for(;i<timers.length;i++){
timer=timers[i];
if(!timer()&&timers[i]===timer){
timers.splice(i--,1);
}
}
if(!timers.length){
jQuery.fx.stop();
}
fxNow=undefined;
};
jQuery.fx.timer=function(timer){
jQuery.timers.push(timer);
jQuery.fx.start();
};
jQuery.fx.interval=13;
jQuery.fx.start=function(){
if(inProgress){
return;
}
inProgress=true;
schedule();
};
jQuery.fx.stop=function(){
inProgress=null;
};
jQuery.fx.speeds={
slow:600,
fast:200,
_default:400
};
jQuery.fn.delay=function(time,type){
time=jQuery.fx?jQuery.fx.speeds[time]||time:time;
type=type||"fx";
return this.queue(type,function(next,hooks){
var timeout=window.setTimeout(next,time);
hooks.stop=function(){
window.clearTimeout(timeout);
};
});
};
(function(){
var input=document.createElement("input"),
select=document.createElement("select"),
opt=select.appendChild(document.createElement("option"));
input.type="checkbox";
support.checkOn=input.value!=="";
support.optSelected=opt.selected;
input=document.createElement("input");
input.value="t";
input.type="radio";
support.radioValue=input.value==="t";
})();
var boolHook,
attrHandle=jQuery.expr.attrHandle;
jQuery.fn.extend({
attr:function(name,value){
return access(this,jQuery.attr,name,value,arguments.length>1);
},
removeAttr:function(name){
return this.each(function(){
jQuery.removeAttr(this,name);
});
}
});
jQuery.extend({
attr:function(elem,name,value){
var ret,hooks,
nType=elem.nodeType;
if(nType===3||nType===8||nType===2){
return;
}
if(typeof elem.getAttribute==="undefined"){
return jQuery.prop(elem,name,value);
}
if(nType!==1||!jQuery.isXMLDoc(elem)){
hooks=jQuery.attrHooks[name.toLowerCase()]||
(jQuery.expr.match.bool.test(name)?boolHook:undefined);
}
if(value!==undefined){
if(value===null){
jQuery.removeAttr(elem,name);
return;
}
if(hooks&&"set"in hooks&&
(ret=hooks.set(elem,value,name))!==undefined){
return ret;
}
elem.setAttribute(name,value+"");
return value;
}
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
return ret;
}
ret=jQuery.find.attr(elem,name);
return ret==null?undefined:ret;
},
attrHooks:{
type:{
set:function(elem,value){
if(!support.radioValue&&value==="radio"&&
nodeName(elem,"input")){
var val=elem.value;
elem.setAttribute("type",value);
if(val){
elem.value=val;
}
return value;
}
}
}
},
removeAttr:function(elem,value){
var name,
i=0,
attrNames=value&&value.match(rnothtmlwhite);
if(attrNames&&elem.nodeType===1){
while((name=attrNames[i++])){
elem.removeAttribute(name);
}
}
}
});
boolHook={
set:function(elem,value,name){
if(value===false){
jQuery.removeAttr(elem,name);
}else{
elem.setAttribute(name,name);
}
return name;
}
};
jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){
var getter=attrHandle[name]||jQuery.find.attr;
attrHandle[name]=function(elem,name,isXML){
var ret,handle,
lowercaseName=name.toLowerCase();
if(!isXML){
handle=attrHandle[lowercaseName];
attrHandle[lowercaseName]=ret;
ret=getter(elem,name,isXML)!=null?
lowercaseName:
null;
attrHandle[lowercaseName]=handle;
}
return ret;
};
});
var rfocusable=/^(?:input|select|textarea|button)$/i,
rclickable=/^(?:a|area)$/i;
jQuery.fn.extend({
prop:function(name,value){
return access(this,jQuery.prop,name,value,arguments.length>1);
},
removeProp:function(name){
return this.each(function(){
delete this[jQuery.propFix[name]||name];
});
}
});
jQuery.extend({
prop:function(elem,name,value){
var ret,hooks,
nType=elem.nodeType;
if(nType===3||nType===8||nType===2){
return;
}
if(nType!==1||!jQuery.isXMLDoc(elem)){
name=jQuery.propFix[name]||name;
hooks=jQuery.propHooks[name];
}
if(value!==undefined){
if(hooks&&"set"in hooks&&
(ret=hooks.set(elem,value,name))!==undefined){
return ret;
}
return(elem[name]=value);
}
if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){
return ret;
}
return elem[name];
},
propHooks:{
tabIndex:{
get:function(elem){
var tabindex=jQuery.find.attr(elem,"tabindex");
if(tabindex){
return parseInt(tabindex,10);
}
if(
rfocusable.test(elem.nodeName)||
rclickable.test(elem.nodeName)&&
elem.href
){
return 0;
}
return-1;
}
}
},
propFix:{
"for":"htmlFor",
"class":"className"
}
});
if(!support.optSelected){
jQuery.propHooks.selected={
get:function(elem){
var parent=elem.parentNode;
if(parent&&parent.parentNode){
parent.parentNode.selectedIndex;
}
return null;
},
set:function(elem){
var parent=elem.parentNode;
if(parent){
parent.selectedIndex;
if(parent.parentNode){
parent.parentNode.selectedIndex;
}
}
}
};
}
jQuery.each([
"tabIndex",
"readOnly",
"maxLength",
"cellSpacing",
"cellPadding",
"rowSpan",
"colSpan",
"useMap",
"frameBorder",
"contentEditable"
],function(){
jQuery.propFix[this.toLowerCase()]=this;
});
function stripAndCollapse(value){
var tokens=value.match(rnothtmlwhite)||[];
return tokens.join(" ");
}
function getClass(elem){
return elem.getAttribute&&elem.getAttribute("class")||"";
}
function classesToArray(value){
if(Array.isArray(value)){
return value;
}
if(typeof value==="string"){
return value.match(rnothtmlwhite)||[];
}
return[];
}
jQuery.fn.extend({
addClass:function(value){
var classNames,cur,curValue,className,i,finalValue;
if(isFunction(value)){
return this.each(function(j){
jQuery(this).addClass(value.call(this,j,getClass(this)));
});
}
classNames=classesToArray(value);
if(classNames.length){
return this.each(function(){
curValue=getClass(this);
cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
if(cur){
for(i=0;i<classNames.length;i++){
className=classNames[i];
if(cur.indexOf(" "+className+" ")<0){
cur+=className+" ";
}
}
finalValue=stripAndCollapse(cur);
if(curValue!==finalValue){
this.setAttribute("class",finalValue);
}
}
});
}
return this;
},
removeClass:function(value){
var classNames,cur,curValue,className,i,finalValue;
if(isFunction(value)){
return this.each(function(j){
jQuery(this).removeClass(value.call(this,j,getClass(this)));
});
}
if(!arguments.length){
return this.attr("class","");
}
classNames=classesToArray(value);
if(classNames.length){
return this.each(function(){
curValue=getClass(this);
cur=this.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");
if(cur){
for(i=0;i<classNames.length;i++){
className=classNames[i];
while(cur.indexOf(" "+className+" ")>-1){
cur=cur.replace(" "+className+" "," ");
}
}
finalValue=stripAndCollapse(cur);
if(curValue!==finalValue){
this.setAttribute("class",finalValue);
}
}
});
}
return this;
},
toggleClass:function(value,stateVal){
var classNames,className,i,self,
type=typeof value,
isValidValue=type==="string"||Array.isArray(value);
if(isFunction(value)){
return this.each(function(i){
jQuery(this).toggleClass(
value.call(this,i,getClass(this),stateVal),
stateVal
);
});
}
if(typeof stateVal==="boolean"&&isValidValue){
return stateVal?this.addClass(value):this.removeClass(value);
}
classNames=classesToArray(value);
return this.each(function(){
if(isValidValue){
self=jQuery(this);
for(i=0;i<classNames.length;i++){
className=classNames[i];
if(self.hasClass(className)){
self.removeClass(className);
}else{
self.addClass(className);
}
}
}else if(value===undefined||type==="boolean"){
className=getClass(this);
if(className){
dataPriv.set(this,"__className__",className);
}
if(this.setAttribute){
this.setAttribute("class",
className||value===false?
"":
dataPriv.get(this,"__className__")||""
);
}
}
});
},
hasClass:function(selector){
var className,elem,
i=0;
className=" "+selector+" ";
while((elem=this[i++])){
if(elem.nodeType===1&&
(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){
return true;
}
}
return false;
}
});
var rreturn=/\r/g;
jQuery.fn.extend({
val:function(value){
var hooks,ret,valueIsFunction,
elem=this[0];
if(!arguments.length){
if(elem){
hooks=jQuery.valHooks[elem.type]||
jQuery.valHooks[elem.nodeName.toLowerCase()];
if(hooks&&
"get"in hooks&&
(ret=hooks.get(elem,"value"))!==undefined
){
return ret;
}
ret=elem.value;
if(typeof ret==="string"){
return ret.replace(rreturn,"");
}
return ret==null?"":ret;
}
return;
}
valueIsFunction=isFunction(value);
return this.each(function(i){
var val;
if(this.nodeType!==1){
return;
}
if(valueIsFunction){
val=value.call(this,i,jQuery(this).val());
}else{
val=value;
}
if(val==null){
val="";
}else if(typeof val==="number"){
val+="";
}else if(Array.isArray(val)){
val=jQuery.map(val,function(value){
return value==null?"":value+"";
});
}
hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];
if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){
this.value=val;
}
});
}
});
jQuery.extend({
valHooks:{
option:{
get:function(elem){
var val=jQuery.find.attr(elem,"value");
return val!=null?
val:
stripAndCollapse(jQuery.text(elem));
}
},
select:{
get:function(elem){
var value,option,i,
options=elem.options,
index=elem.selectedIndex,
one=elem.type==="select-one",
values=one?null:[],
max=one?index+1:options.length;
if(index<0){
i=max;
}else{
i=one?index:0;
}
for(;i<max;i++){
option=options[i];
if((option.selected||i===index)&&
!option.disabled&&
(!option.parentNode.disabled||
!nodeName(option.parentNode,"optgroup"))){
value=jQuery(option).val();
if(one){
return value;
}
values.push(value);
}
}
return values;
},
set:function(elem,value){
var optionSet,option,
options=elem.options,
values=jQuery.makeArray(value),
i=options.length;
while(i--){
option=options[i];
if(option.selected=
jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1
){
optionSet=true;
}
}
if(!optionSet){
elem.selectedIndex=-1;
}
return values;
}
}
}
});
jQuery.each(["radio","checkbox"],function(){
jQuery.valHooks[this]={
set:function(elem,value){
if(Array.isArray(value)){
return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);
}
}
};
if(!support.checkOn){
jQuery.valHooks[this].get=function(elem){
return elem.getAttribute("value")===null?"on":elem.value;
};
}
});
var location=window.location;
var nonce={guid:Date.now()};
var rquery=(/\?/);
jQuery.parseXML=function(data){
var xml,parserErrorElem;
if(!data||typeof data!=="string"){
return null;
}
try{
xml=(new window.DOMParser()).parseFromString(data,"text/xml");
}catch(e){}
parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];
if(!xml||parserErrorElem){
jQuery.error("Invalid XML: "+(
parserErrorElem?
jQuery.map(parserErrorElem.childNodes,function(el){
return el.textContent;
}).join("\n"):
data
));
}
return xml;
};
var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,
stopPropagationCallback=function(e){
e.stopPropagation();
};
jQuery.extend(jQuery.event,{
trigger:function(event,data,elem,onlyHandlers){
var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,
eventPath=[elem||document],
type=hasOwn.call(event,"type")?event.type:event,
namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];
cur=lastElement=tmp=elem=elem||document;
if(elem.nodeType===3||elem.nodeType===8){
return;
}
if(rfocusMorph.test(type+jQuery.event.triggered)){
return;
}
if(type.indexOf(".")>-1){
namespaces=type.split(".");
type=namespaces.shift();
namespaces.sort();
}
ontype=type.indexOf(":")<0&&"on"+type;
event=event[jQuery.expando]?
event:
new jQuery.Event(type,typeof event==="object"&&event);
event.isTrigger=onlyHandlers?2:3;
event.namespace=namespaces.join(".");
event.rnamespace=event.namespace?
new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):
null;
event.result=undefined;
if(!event.target){
event.target=elem;
}
data=data==null?
[event]:
jQuery.makeArray(data,[event]);
special=jQuery.event.special[type]||{};
if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){
return;
}
if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){
bubbleType=special.delegateType||type;
if(!rfocusMorph.test(bubbleType+type)){
cur=cur.parentNode;
}
for(;cur;cur=cur.parentNode){
eventPath.push(cur);
tmp=cur;
}
if(tmp===(elem.ownerDocument||document)){
eventPath.push(tmp.defaultView||tmp.parentWindow||window);
}
}
i=0;
while((cur=eventPath[i++])&&!event.isPropagationStopped()){
lastElement=cur;
event.type=i>1?
bubbleType:
special.bindType||type;
handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&
dataPriv.get(cur,"handle");
if(handle){
handle.apply(cur,data);
}
handle=ontype&&cur[ontype];
if(handle&&handle.apply&&acceptData(cur)){
event.result=handle.apply(cur,data);
if(event.result===false){
event.preventDefault();
}
}
}
event.type=type;
if(!onlyHandlers&&!event.isDefaultPrevented()){
if((!special._default||
special._default.apply(eventPath.pop(),data)===false)&&
acceptData(elem)){
if(ontype&&isFunction(elem[type])&&!isWindow(elem)){
tmp=elem[ontype];
if(tmp){
elem[ontype]=null;
}
jQuery.event.triggered=type;
if(event.isPropagationStopped()){
lastElement.addEventListener(type,stopPropagationCallback);
}
elem[type]();
if(event.isPropagationStopped()){
lastElement.removeEventListener(type,stopPropagationCallback);
}
jQuery.event.triggered=undefined;
if(tmp){
elem[ontype]=tmp;
}
}
}
}
return event.result;
},
simulate:function(type,elem,event){
var e=jQuery.extend(
new jQuery.Event(),
event,
{
type:type,
isSimulated:true
}
);
jQuery.event.trigger(e,null,elem);
}
});
jQuery.fn.extend({
trigger:function(type,data){
return this.each(function(){
jQuery.event.trigger(type,data,this);
});
},
triggerHandler:function(type,data){
var elem=this[0];
if(elem){
return jQuery.event.trigger(type,data,elem,true);
}
}
});
var
rbracket=/\[\]$/,
rCRLF=/\r?\n/g,
rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,
rsubmittable=/^(?:input|select|textarea|keygen)/i;
function buildParams(prefix,obj,traditional,add){
var name;
if(Array.isArray(obj)){
jQuery.each(obj,function(i,v){
if(traditional||rbracket.test(prefix)){
add(prefix,v);
}else{
buildParams(
prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",
v,
traditional,
add
);
}
});
}else if(!traditional&&toType(obj)==="object"){
for(name in obj){
buildParams(prefix+"["+name+"]",obj[name],traditional,add);
}
}else{
add(prefix,obj);
}
}
jQuery.param=function(a,traditional){
var prefix,
s=[],
add=function(key,valueOrFunction){
var value=isFunction(valueOrFunction)?
valueOrFunction():
valueOrFunction;
s[s.length]=encodeURIComponent(key)+"="+
encodeURIComponent(value==null?"":value);
};
if(a==null){
return"";
}
if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){
jQuery.each(a,function(){
add(this.name,this.value);
});
}else{
for(prefix in a){
buildParams(prefix,a[prefix],traditional,add);
}
}
return s.join("&");
};
jQuery.fn.extend({
serialize:function(){
return jQuery.param(this.serializeArray());
},
serializeArray:function(){
return this.map(function(){
var elements=jQuery.prop(this,"elements");
return elements?jQuery.makeArray(elements):this;
}).filter(function(){
var type=this.type;
return this.name&&!jQuery(this).is(":disabled")&&
rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&
(this.checked||!rcheckableType.test(type));
}).map(function(_i,elem){
var val=jQuery(this).val();
if(val==null){
return null;
}
if(Array.isArray(val)){
return jQuery.map(val,function(val){
return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
});
}
return{name:elem.name,value:val.replace(rCRLF,"\r\n")};
}).get();
}
});
var
r20=/%20/g,
rhash=/#.*$/,
rantiCache=/([?&])_=[^&]*/,
rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,
rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
rnoContent=/^(?:GET|HEAD)$/,
rprotocol=/^\/\//,
prefilters={},
transports={},
allTypes="*/".concat("*"),
originAnchor=document.createElement("a");
originAnchor.href=location.href;
function addToPrefiltersOrTransports(structure){
return function(dataTypeExpression,func){
if(typeof dataTypeExpression!=="string"){
func=dataTypeExpression;
dataTypeExpression="*";
}
var dataType,
i=0,
dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];
if(isFunction(func)){
while((dataType=dataTypes[i++])){
if(dataType[0]==="+"){
dataType=dataType.slice(1)||"*";
(structure[dataType]=structure[dataType]||[]).unshift(func);
}else{
(structure[dataType]=structure[dataType]||[]).push(func);
}
}
}
};
}
function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){
var inspected={},
seekingTransport=(structure===transports);
function inspect(dataType){
var selected;
inspected[dataType]=true;
jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){
var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);
if(typeof dataTypeOrTransport==="string"&&
!seekingTransport&&!inspected[dataTypeOrTransport]){
options.dataTypes.unshift(dataTypeOrTransport);
inspect(dataTypeOrTransport);
return false;
}else if(seekingTransport){
return!(selected=dataTypeOrTransport);
}
});
return selected;
}
return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");
}
function ajaxExtend(target,src){
var key,deep,
flatOptions=jQuery.ajaxSettings.flatOptions||{};
for(key in src){
if(src[key]!==undefined){
(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];
}
}
if(deep){
jQuery.extend(true,target,deep);
}
return target;
}
function ajaxHandleResponses(s,jqXHR,responses){
var ct,type,finalDataType,firstDataType,
contents=s.contents,
dataTypes=s.dataTypes;
while(dataTypes[0]==="*"){
dataTypes.shift();
if(ct===undefined){
ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");
}
}
if(ct){
for(type in contents){
if(contents[type]&&contents[type].test(ct)){
dataTypes.unshift(type);
break;
}
}
}
if(dataTypes[0]in responses){
finalDataType=dataTypes[0];
}else{
for(type in responses){
if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){
finalDataType=type;
break;
}
if(!firstDataType){
firstDataType=type;
}
}
finalDataType=finalDataType||firstDataType;
}
if(finalDataType){
if(finalDataType!==dataTypes[0]){
dataTypes.unshift(finalDataType);
}
return responses[finalDataType];
}
}
function ajaxConvert(s,response,jqXHR,isSuccess){
var conv2,current,conv,tmp,prev,
converters={},
dataTypes=s.dataTypes.slice();
if(dataTypes[1]){
for(conv in s.converters){
converters[conv.toLowerCase()]=s.converters[conv];
}
}
current=dataTypes.shift();
while(current){
if(s.responseFields[current]){
jqXHR[s.responseFields[current]]=response;
}
if(!prev&&isSuccess&&s.dataFilter){
response=s.dataFilter(response,s.dataType);
}
prev=current;
current=dataTypes.shift();
if(current){
if(current==="*"){
current=prev;
}else if(prev!=="*"&&prev!==current){
conv=converters[prev+" "+current]||converters["* "+current];
if(!conv){
for(conv2 in converters){
tmp=conv2.split(" ");
if(tmp[1]===current){
conv=converters[prev+" "+tmp[0]]||
converters["* "+tmp[0]];
if(conv){
if(conv===true){
conv=converters[conv2];
}else if(converters[conv2]!==true){
current=tmp[0];
dataTypes.unshift(tmp[1]);
}
break;
}
}
}
}
if(conv!==true){
if(conv&&s.throws){
response=conv(response);
}else{
try{
response=conv(response);
}catch(e){
return{
state:"parsererror",
error:conv?e:"No conversion from "+prev+" to "+current
};
}
}
}
}
}
}
return{state:"success",data:response};
}
jQuery.extend({
active:0,
lastModified:{},
etag:{},
ajaxSettings:{
url:location.href,
type:"GET",
isLocal:rlocalProtocol.test(location.protocol),
global:true,
processData:true,
async:true,
contentType:"application/x-www-form-urlencoded; charset=UTF-8",
accepts:{
"*":allTypes,
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":true,
"text json":JSON.parse,
"text xml":jQuery.parseXML
},
flatOptions:{
url:true,
context:true
}
},
ajaxSetup:function(target,settings){
return settings?
ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):
ajaxExtend(jQuery.ajaxSettings,target);
},
ajaxPrefilter:addToPrefiltersOrTransports(prefilters),
ajaxTransport:addToPrefiltersOrTransports(transports),
ajax:function(url,options){
if(typeof url==="object"){
options=url;
url=undefined;
}
options=options||{};
var transport,
cacheURL,
responseHeadersString,
responseHeaders,
timeoutTimer,
urlAnchor,
completed,
fireGlobals,
i,
uncached,
s=jQuery.ajaxSetup({},options),
callbackContext=s.context||s,
globalEventContext=s.context&&
(callbackContext.nodeType||callbackContext.jquery)?
jQuery(callbackContext):
jQuery.event,
deferred=jQuery.Deferred(),
completeDeferred=jQuery.Callbacks("once memory"),
statusCode=s.statusCode||{},
requestHeaders={},
requestHeadersNames={},
strAbort="canceled",
jqXHR={
readyState:0,
getResponseHeader:function(key){
var match;
if(completed){
if(!responseHeaders){
responseHeaders={};
while((match=rheaders.exec(responseHeadersString))){
responseHeaders[match[1].toLowerCase()+" "]=
(responseHeaders[match[1].toLowerCase()+" "]||[])
.concat(match[2]);
}
}
match=responseHeaders[key.toLowerCase()+" "];
}
return match==null?null:match.join(", ");
},
getAllResponseHeaders:function(){
return completed?responseHeadersString:null;
},
setRequestHeader:function(name,value){
if(completed==null){
name=requestHeadersNames[name.toLowerCase()]=
requestHeadersNames[name.toLowerCase()]||name;
requestHeaders[name]=value;
}
return this;
},
overrideMimeType:function(type){
if(completed==null){
s.mimeType=type;
}
return this;
},
statusCode:function(map){
var code;
if(map){
if(completed){
jqXHR.always(map[jqXHR.status]);
}else{
for(code in map){
statusCode[code]=[statusCode[code],map[code]];
}
}
}
return this;
},
abort:function(statusText){
var finalText=statusText||strAbort;
if(transport){
transport.abort(finalText);
}
done(0,finalText);
return this;
}
};
deferred.promise(jqXHR);
s.url=((url||s.url||location.href)+"")
.replace(rprotocol,location.protocol+"//");
s.type=options.method||options.type||s.method||s.type;
s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];
if(s.crossDomain==null){
urlAnchor=document.createElement("a");
try{
urlAnchor.href=s.url;
urlAnchor.href=urlAnchor.href;
s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==
urlAnchor.protocol+"//"+urlAnchor.host;
}catch(e){
s.crossDomain=true;
}
}
if(s.data&&s.processData&&typeof s.data!=="string"){
s.data=jQuery.param(s.data,s.traditional);
}
inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);
if(completed){
return jqXHR;
}
fireGlobals=jQuery.event&&s.global;
if(fireGlobals&&jQuery.active++===0){
jQuery.event.trigger("ajaxStart");
}
s.type=s.type.toUpperCase();
s.hasContent=!rnoContent.test(s.type);
cacheURL=s.url.replace(rhash,"");
if(!s.hasContent){
uncached=s.url.slice(cacheURL.length);
if(s.data&&(s.processData||typeof s.data==="string")){
cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;
delete s.data;
}
if(s.cache===false){
cacheURL=cacheURL.replace(rantiCache,"$1");
uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce.guid++)+
uncached;
}
s.url=cacheURL+uncached;
}else if(s.data&&s.processData&&
(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){
s.data=s.data.replace(r20,"+");
}
if(s.ifModified){
if(jQuery.lastModified[cacheURL]){
jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);
}
if(jQuery.etag[cacheURL]){
jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);
}
}
if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){
jqXHR.setRequestHeader("Content-Type",s.contentType);
}
jqXHR.setRequestHeader(
"Accept",
s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?
s.accepts[s.dataTypes[0]]+
(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):
s.accepts["*"]
);
for(i in s.headers){
jqXHR.setRequestHeader(i,s.headers[i]);
}
if(s.beforeSend&&
(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){
return jqXHR.abort();
}
strAbort="abort";
completeDeferred.add(s.complete);
jqXHR.done(s.success);
jqXHR.fail(s.error);
transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);
if(!transport){
done(-1,"No Transport");
}else{
jqXHR.readyState=1;
if(fireGlobals){
globalEventContext.trigger("ajaxSend",[jqXHR,s]);
}
if(completed){
return jqXHR;
}
if(s.async&&s.timeout>0){
timeoutTimer=window.setTimeout(function(){
jqXHR.abort("timeout");
},s.timeout);
}
try{
completed=false;
transport.send(requestHeaders,done);
}catch(e){
if(completed){
throw e;
}
done(-1,e);
}
}
function done(status,nativeStatusText,responses,headers){
var isSuccess,success,error,response,modified,
statusText=nativeStatusText;
if(completed){
return;
}
completed=true;
if(timeoutTimer){
window.clearTimeout(timeoutTimer);
}
transport=undefined;
responseHeadersString=headers||"";
jqXHR.readyState=status>0?4:0;
isSuccess=status>=200&&status<300||status===304;
if(responses){
response=ajaxHandleResponses(s,jqXHR,responses);
}
if(!isSuccess&&
jQuery.inArray("script",s.dataTypes)>-1&&
jQuery.inArray("json",s.dataTypes)<0){
s.converters["text script"]=function(){};
}
response=ajaxConvert(s,response,jqXHR,isSuccess);
if(isSuccess){
if(s.ifModified){
modified=jqXHR.getResponseHeader("Last-Modified");
if(modified){
jQuery.lastModified[cacheURL]=modified;
}
modified=jqXHR.getResponseHeader("etag");
if(modified){
jQuery.etag[cacheURL]=modified;
}
}
if(status===204||s.type==="HEAD"){
statusText="nocontent";
}else if(status===304){
statusText="notmodified";
}else{
statusText=response.state;
success=response.data;
error=response.error;
isSuccess=!error;
}
}else{
error=statusText;
if(status||!statusText){
statusText="error";
if(status<0){
status=0;
}
}
}
jqXHR.status=status;
jqXHR.statusText=(nativeStatusText||statusText)+"";
if(isSuccess){
deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);
}else{
deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);
}
jqXHR.statusCode(statusCode);
statusCode=undefined;
if(fireGlobals){
globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",
[jqXHR,s,isSuccess?success:error]);
}
completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);
if(fireGlobals){
globalEventContext.trigger("ajaxComplete",[jqXHR,s]);
if(!(--jQuery.active)){
jQuery.event.trigger("ajaxStop");
}
}
}
return jqXHR;
},
getJSON:function(url,data,callback){
return jQuery.get(url,data,callback,"json");
},
getScript:function(url,callback){
return jQuery.get(url,undefined,callback,"script");
}
});
jQuery.each(["get","post"],function(_i,method){
jQuery[method]=function(url,data,callback,type){
if(isFunction(data)){
type=type||callback;
callback=data;
data=undefined;
}
return jQuery.ajax(jQuery.extend({
url:url,
type:method,
dataType:type,
data:data,
success:callback
},jQuery.isPlainObject(url)&&url));
};
});
jQuery.ajaxPrefilter(function(s){
var i;
for(i in s.headers){
if(i.toLowerCase()==="content-type"){
s.contentType=s.headers[i]||"";
}
}
});
jQuery._evalUrl=function(url,options,doc){
return jQuery.ajax({
url:url,
type:"GET",
dataType:"script",
cache:true,
async:false,
global:false,
converters:{
"text script":function(){}
},
dataFilter:function(response){
jQuery.globalEval(response,options,doc);
}
});
};
jQuery.fn.extend({
wrapAll:function(html){
var wrap;
if(this[0]){
if(isFunction(html)){
html=html.call(this[0]);
}
wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);
if(this[0].parentNode){
wrap.insertBefore(this[0]);
}
wrap.map(function(){
var elem=this;
while(elem.firstElementChild){
elem=elem.firstElementChild;
}
return elem;
}).append(this);
}
return this;
},
wrapInner:function(html){
if(isFunction(html)){
return this.each(function(i){
jQuery(this).wrapInner(html.call(this,i));
});
}
return this.each(function(){
var self=jQuery(this),
contents=self.contents();
if(contents.length){
contents.wrapAll(html);
}else{
self.append(html);
}
});
},
wrap:function(html){
var htmlIsFunction=isFunction(html);
return this.each(function(i){
jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);
});
},
unwrap:function(selector){
this.parent(selector).not("body").each(function(){
jQuery(this).replaceWith(this.childNodes);
});
return this;
}
});
jQuery.expr.pseudos.hidden=function(elem){
return!jQuery.expr.pseudos.visible(elem);
};
jQuery.expr.pseudos.visible=function(elem){
return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);
};
jQuery.ajaxSettings.xhr=function(){
try{
return new window.XMLHttpRequest();
}catch(e){}
};
var xhrSuccessStatus={
0:200,
1223:204
},
xhrSupported=jQuery.ajaxSettings.xhr();
support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);
support.ajax=xhrSupported=!!xhrSupported;
jQuery.ajaxTransport(function(options){
var callback,errorCallback;
if(support.cors||xhrSupported&&!options.crossDomain){
return{
send:function(headers,complete){
var i,
xhr=options.xhr();
xhr.open(
options.type,
options.url,
options.async,
options.username,
options.password
);
if(options.xhrFields){
for(i in options.xhrFields){
xhr[i]=options.xhrFields[i];
}
}
if(options.mimeType&&xhr.overrideMimeType){
xhr.overrideMimeType(options.mimeType);
}
if(!options.crossDomain&&!headers["X-Requested-With"]){
headers["X-Requested-With"]="XMLHttpRequest";
}
for(i in headers){
xhr.setRequestHeader(i,headers[i]);
}
callback=function(type){
return function(){
if(callback){
callback=errorCallback=xhr.onload=
xhr.onerror=xhr.onabort=xhr.ontimeout=
xhr.onreadystatechange=null;
if(type==="abort"){
xhr.abort();
}else if(type==="error"){
if(typeof xhr.status!=="number"){
complete(0,"error");
}else{
complete(
xhr.status,
xhr.statusText
);
}
}else{
complete(
xhrSuccessStatus[xhr.status]||xhr.status,
xhr.statusText,
(xhr.responseType||"text")!=="text"||
typeof xhr.responseText!=="string"?
{binary:xhr.response}:
{text:xhr.responseText},
xhr.getAllResponseHeaders()
);
}
}
};
};
xhr.onload=callback();
errorCallback=xhr.onerror=xhr.ontimeout=callback("error");
if(xhr.onabort!==undefined){
xhr.onabort=errorCallback;
}else{
xhr.onreadystatechange=function(){
if(xhr.readyState===4){
window.setTimeout(function(){
if(callback){
errorCallback();
}
});
}
};
}
callback=callback("abort");
try{
xhr.send(options.hasContent&&options.data||null);
}catch(e){
if(callback){
throw e;
}
}
},
abort:function(){
if(callback){
callback();
}
}
};
}
});
jQuery.ajaxPrefilter(function(s){
if(s.crossDomain){
s.contents.script=false;
}
});
jQuery.ajaxSetup({
accepts:{
script:"text/javascript, application/javascript, "+
"application/ecmascript, application/x-ecmascript"
},
contents:{
script:/\b(?:java|ecma)script\b/
},
converters:{
"text script":function(text){
jQuery.globalEval(text);
return text;
}
}
});
jQuery.ajaxPrefilter("script",function(s){
if(s.cache===undefined){
s.cache=false;
}
if(s.crossDomain){
s.type="GET";
}
});
jQuery.ajaxTransport("script",function(s){
if(s.crossDomain||s.scriptAttrs){
var script,callback;
return{
send:function(_,complete){
script=jQuery("<script>")
.attr(s.scriptAttrs||{})
.prop({charset:s.scriptCharset,src:s.url})
.on("load error",callback=function(evt){
script.remove();
callback=null;
if(evt){
complete(evt.type==="error"?404:200,evt.type);
}
});
document.head.appendChild(script[0]);
},
abort:function(){
if(callback){
callback();
}
}
};
}
});
var oldCallbacks=[],
rjsonp=/(=)\?(?=&|$)|\?\?/;
jQuery.ajaxSetup({
jsonp:"callback",
jsonpCallback:function(){
var callback=oldCallbacks.pop()||(jQuery.expando+"_"+(nonce.guid++));
this[callback]=true;
return callback;
}
});
jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){
var callbackName,overwritten,responseContainer,
jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?
"url":
typeof s.data==="string"&&
(s.contentType||"")
.indexOf("application/x-www-form-urlencoded")===0&&
rjsonp.test(s.data)&&"data"
);
if(jsonProp||s.dataTypes[0]==="jsonp"){
callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?
s.jsonpCallback():
s.jsonpCallback;
if(jsonProp){
s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);
}else if(s.jsonp!==false){
s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;
}
s.converters["script json"]=function(){
if(!responseContainer){
jQuery.error(callbackName+" was not called");
}
return responseContainer[0];
};
s.dataTypes[0]="json";
overwritten=window[callbackName];
window[callbackName]=function(){
responseContainer=arguments;
};
jqXHR.always(function(){
if(overwritten===undefined){
jQuery(window).removeProp(callbackName);
}else{
window[callbackName]=overwritten;
}
if(s[callbackName]){
s.jsonpCallback=originalSettings.jsonpCallback;
oldCallbacks.push(callbackName);
}
if(responseContainer&&isFunction(overwritten)){
overwritten(responseContainer[0]);
}
responseContainer=overwritten=undefined;
});
return"script";
}
});
support.createHTMLDocument=(function(){
var body=document.implementation.createHTMLDocument("").body;
body.innerHTML="<form></form><form></form>";
return body.childNodes.length===2;
})();
jQuery.parseHTML=function(data,context,keepScripts){
if(typeof data!=="string"){
return[];
}
if(typeof context==="boolean"){
keepScripts=context;
context=false;
}
var base,parsed,scripts;
if(!context){
if(support.createHTMLDocument){
context=document.implementation.createHTMLDocument("");
base=context.createElement("base");
base.href=document.location.href;
context.head.appendChild(base);
}else{
context=document;
}
}
parsed=rsingleTag.exec(data);
scripts=!keepScripts&&[];
if(parsed){
return[context.createElement(parsed[1])];
}
parsed=buildFragment([data],context,scripts);
if(scripts&&scripts.length){
jQuery(scripts).remove();
}
return jQuery.merge([],parsed.childNodes);
};
jQuery.fn.load=function(url,params,callback){
var selector,type,response,
self=this,
off=url.indexOf(" ");
if(off>-1){
selector=stripAndCollapse(url.slice(off));
url=url.slice(0,off);
}
if(isFunction(params)){
callback=params;
params=undefined;
}else if(params&&typeof params==="object"){
type="POST";
}
if(self.length>0){
jQuery.ajax({
url:url,
type:type||"GET",
dataType:"html",
data:params
}).done(function(responseText){
response=arguments;
self.html(selector?
jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):
responseText);
}).always(callback&&function(jqXHR,status){
self.each(function(){
callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);
});
});
}
return this;
};
jQuery.expr.pseudos.animated=function(elem){
return jQuery.grep(jQuery.timers,function(fn){
return elem===fn.elem;
}).length;
};
jQuery.offset={
setOffset:function(elem,options,i){
var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,
position=jQuery.css(elem,"position"),
curElem=jQuery(elem),
props={};
if(position==="static"){
elem.style.position="relative";
}
curOffset=curElem.offset();
curCSSTop=jQuery.css(elem,"top");
curCSSLeft=jQuery.css(elem,"left");
calculatePosition=(position==="absolute"||position==="fixed")&&
(curCSSTop+curCSSLeft).indexOf("auto")>-1;
if(calculatePosition){
curPosition=curElem.position();
curTop=curPosition.top;
curLeft=curPosition.left;
}else{
curTop=parseFloat(curCSSTop)||0;
curLeft=parseFloat(curCSSLeft)||0;
}
if(isFunction(options)){
options=options.call(elem,i,jQuery.extend({},curOffset));
}
if(options.top!=null){
props.top=(options.top-curOffset.top)+curTop;
}
if(options.left!=null){
props.left=(options.left-curOffset.left)+curLeft;
}
if("using"in options){
options.using.call(elem,props);
}else{
curElem.css(props);
}
}
};
jQuery.fn.extend({
offset:function(options){
if(arguments.length){
return options===undefined?
this:
this.each(function(i){
jQuery.offset.setOffset(this,options,i);
});
}
var rect,win,
elem=this[0];
if(!elem){
return;
}
if(!elem.getClientRects().length){
return{top:0,left:0};
}
rect=elem.getBoundingClientRect();
win=elem.ownerDocument.defaultView;
return{
top:rect.top+win.pageYOffset,
left:rect.left+win.pageXOffset
};
},
position:function(){
if(!this[0]){
return;
}
var offsetParent,offset,doc,
elem=this[0],
parentOffset={top:0,left:0};
if(jQuery.css(elem,"position")==="fixed"){
offset=elem.getBoundingClientRect();
}else{
offset=this.offset();
doc=elem.ownerDocument;
offsetParent=elem.offsetParent||doc.documentElement;
while(offsetParent&&
(offsetParent===doc.body||offsetParent===doc.documentElement)&&
jQuery.css(offsetParent,"position")==="static"){
offsetParent=offsetParent.parentNode;
}
if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){
parentOffset=jQuery(offsetParent).offset();
parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);
parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);
}
}
return{
top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),
left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)
};
},
offsetParent:function(){
return this.map(function(){
var offsetParent=this.offsetParent;
while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){
offsetParent=offsetParent.offsetParent;
}
return offsetParent||documentElement;
});
}
});
jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){
var top="pageYOffset"===prop;
jQuery.fn[method]=function(val){
return access(this,function(elem,method,val){
var win;
if(isWindow(elem)){
win=elem;
}else if(elem.nodeType===9){
win=elem.defaultView;
}
if(val===undefined){
return win?win[prop]:elem[method];
}
if(win){
win.scrollTo(
!top?val:win.pageXOffset,
top?val:win.pageYOffset
);
}else{
elem[method]=val;
}
},method,val,arguments.length);
};
});
jQuery.each(["top","left"],function(_i,prop){
jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,
function(elem,computed){
if(computed){
computed=curCSS(elem,prop);
return rnumnonpx.test(computed)?
jQuery(elem).position()[prop]+"px":
computed;
}
}
);
});
jQuery.each({Height:"height",Width:"width"},function(name,type){
jQuery.each({
padding:"inner"+name,
content:type,
"":"outer"+name
},function(defaultExtra,funcName){
jQuery.fn[funcName]=function(margin,value){
var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),
extra=defaultExtra||(margin===true||value===true?"margin":"border");
return access(this,function(elem,type,value){
var doc;
if(isWindow(elem)){
return funcName.indexOf("outer")===0?
elem["inner"+name]:
elem.document.documentElement["client"+name];
}
if(elem.nodeType===9){
doc=elem.documentElement;
return Math.max(
elem.body["scroll"+name],doc["scroll"+name],
elem.body["offset"+name],doc["offset"+name],
doc["client"+name]
);
}
return value===undefined?
jQuery.css(elem,type,extra):
jQuery.style(elem,type,value,extra);
},type,chainable?margin:undefined,chainable);
};
});
});
jQuery.each([
"ajaxStart",
"ajaxStop",
"ajaxComplete",
"ajaxError",
"ajaxSuccess",
"ajaxSend"
],function(_i,type){
jQuery.fn[type]=function(fn){
return this.on(type,fn);
};
});
jQuery.fn.extend({
bind:function(types,data,fn){
return this.on(types,null,data,fn);
},
unbind:function(types,fn){
return this.off(types,null,fn);
},
delegate:function(selector,types,data,fn){
return this.on(types,selector,data,fn);
},
undelegate:function(selector,types,fn){
return arguments.length===1?
this.off(selector,"**"):
this.off(types,selector||"**",fn);
},
hover:function(fnOver,fnOut){
return this
.on("mouseenter",fnOver)
.on("mouseleave",fnOut||fnOver);
}
});
jQuery.each(
("blur focus focusin focusout resize scroll click dblclick "+
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+
"change select submit keydown keypress keyup contextmenu").split(" "),
function(_i,name){
jQuery.fn[name]=function(data,fn){
return arguments.length>0?
this.on(name,null,data,fn):
this.trigger(name);
};
}
);
var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
jQuery.proxy=function(fn,context){
var tmp,args,proxy;
if(typeof context==="string"){
tmp=fn[context];
context=fn;
fn=tmp;
}
if(!isFunction(fn)){
return undefined;
}
args=slice.call(arguments,2);
proxy=function(){
return fn.apply(context||this,args.concat(slice.call(arguments)));
};
proxy.guid=fn.guid=fn.guid||jQuery.guid++;
return proxy;
};
jQuery.holdReady=function(hold){
if(hold){
jQuery.readyWait++;
}else{
jQuery.ready(true);
}
};
jQuery.isArray=Array.isArray;
jQuery.parseJSON=JSON.parse;
jQuery.nodeName=nodeName;
jQuery.isFunction=isFunction;
jQuery.isWindow=isWindow;
jQuery.camelCase=camelCase;
jQuery.type=toType;
jQuery.now=Date.now;
jQuery.isNumeric=function(obj){
var type=jQuery.type(obj);
return(type==="number"||type==="string")&&
!isNaN(obj-parseFloat(obj));
};
jQuery.trim=function(text){
return text==null?
"":
(text+"").replace(rtrim,"$1");
};
if(typeof define==="function"&&define.amd){
define("jquery",[],function(){
return jQuery;
});
}
var
_jQuery=window.jQuery,
_$=window.$;
jQuery.noConflict=function(deep){
if(window.$===jQuery){
window.$=_$;
}
if(deep&&window.jQuery===jQuery){
window.jQuery=_jQuery;
}
return jQuery;
};
if(typeof noGlobal==="undefined"){
window.jQuery=window.$=jQuery;
}
return jQuery;
});
/* prive/javascript/jquery.form.js?1749554704 */
(function(factory){
if(typeof define==='function'&&define.amd){
define(['jquery'],factory);
}else if(typeof module==='object'&&module.exports){
module.exports=function(root,jQuery){
if(typeof jQuery==='undefined'){
if(typeof window!=='undefined'){
jQuery=require('jquery');
}
else{
jQuery=require('jquery')(root);
}
}
factory(jQuery);
return jQuery;
};
}else{
factory(jQuery);
}
}(function($){
'use strict';
var rCRLF=/\r?\n/g;
var feature={};
feature.fileapi=$('<input type="file">').get(0).files!==undefined;
feature.formdata=(typeof window.FormData!=='undefined');
var hasProp=!!$.fn.prop;
$.fn.attr2=function(){
if(!hasProp){
return this.attr.apply(this,arguments);
}
var val=this.prop.apply(this,arguments);
if((val&&val.jquery)||typeof val==='string'){
return val;
}
return this.attr.apply(this,arguments);
};
$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){
if(!this.length){
log('ajaxSubmit: skipping submit process - no element selected');
return this;
}
var method,action,url,isMsie,iframeSrc,$form=this;
if(typeof options==='function'){
options={success:options};
}else if(typeof options==='string'||(options===false&&arguments.length>0)){
options={
'url':options,
'data':data,
'dataType':dataType
};
if(typeof onSuccess==='function'){
options.success=onSuccess;
}
}else if(typeof options==='undefined'){
options={};
}
method=options.method||options.type||this.attr2('method');
action=options.url||this.attr2('action');
url=(typeof action==='string')?$.trim(action):'';
url=url||window.location.href||'';
if(url){
url=(url.match(/^([^#]+)/)||[])[1];
}
isMsie=/(MSIE|Trident)/.test(navigator.userAgent||'');
iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank';
options=$.extend(true,{
url:url,
success:$.ajaxSettings.success,
type:method||$.ajaxSettings.type,
iframeSrc:iframeSrc
},options);
var veto={};
this.trigger('form-pre-serialize',[this,options,veto]);
if(veto.veto){
log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
return this;
}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){
log('ajaxSubmit: submit aborted via beforeSerialize callback');
return this;
}
var traditional=options.traditional;
if(typeof traditional==='undefined'){
traditional=$.ajaxSettings.traditional;
}
var elements=[];
var qx,a=this.formToArray(options.semantic,elements,options.filtering);
if(options.data){
var optionsData=$.isFunction(options.data)?options.data(a):options.data;
options.extraData=optionsData;
qx=$.param(optionsData,traditional);
}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){
log('ajaxSubmit: submit aborted via beforeSubmit callback');
return this;
}
this.trigger('form-submit-validate',[a,this,options,veto]);
if(veto.veto){
log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
return this;
}
var q=$.param(a,traditional);
if(qx){
q=(q?(q+'&'+qx):qx);
}
if(options.type.toUpperCase()==='GET'){
options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;
options.data=null;
}else{
options.data=q;
}
var callbacks=[];
if(options.resetForm){
callbacks.push(function(){
$form.resetForm();
});
}
if(options.clearForm){
callbacks.push(function(){
$form.clearForm(options.includeHidden);
});
}
if(!options.dataType&&options.target){
var oldSuccess=options.success||function(){};
callbacks.push(function(data,textStatus,jqXHR){
var successArguments=arguments,
fn=options.replaceTarget?'replaceWith':'html';
if(fn=='html'){
data=$.parseHTML($("<div>").text(data).html())
};
$(options.target)[fn](data).each(function(){
oldSuccess.apply(this,successArguments);
});
});
}else if(options.success){
if($.isArray(options.success)){
$.merge(callbacks,options.success);
}else{
callbacks.push(options.success);
}
}
options.success=function(data,status,xhr){
var context=options.context||this;
for(var i=0,max=callbacks.length;i<max;i++){
callbacks[i].apply(context,[data,status,xhr||$form,$form]);
}
};
if(options.error){
var oldError=options.error;
options.error=function(xhr,status,error){
var context=options.context||this;
oldError.apply(context,[xhr,status,error,$form]);
};
}
if(options.complete){
var oldComplete=options.complete;
options.complete=function(xhr,status){
var context=options.context||this;
oldComplete.apply(context,[xhr,status,$form]);
};
}
var fileInputs=$('input[type=file]:enabled',this).filter(function(){
return $(this).val()!=='';
});
var hasFileInputs=fileInputs.length>0;
var mp='multipart/form-data';
var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp);
var fileAPI=feature.fileapi&&feature.formdata;
log('fileAPI :'+fileAPI);
var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;
var jqxhr;
if(options.iframe!==false&&(options.iframe||shouldUseFrame)){
if(options.closeKeepAlive){
$.get(options.closeKeepAlive,function(){
jqxhr=fileUploadIframe(a);
});
}else{
jqxhr=fileUploadIframe(a);
}
}else if((hasFileInputs||multipart)&&fileAPI){
jqxhr=fileUploadXhr(a);
}else{
jqxhr=$.ajax(options);
}
$form.removeData('jqxhr').data('jqxhr',jqxhr);
for(var k=0;k<elements.length;k++){
elements[k]=null;
}
this.trigger('form-submit-notify',[this,options]);
return this;
function deepSerialize(extraData){
var serialized=$.param(extraData,options.traditional).split('&');
var len=serialized.length;
var result=[];
var i,part;
for(i=0;i<len;i++){
serialized[i]=serialized[i].replace(/\+/g,' ');
part=serialized[i].split('=');
result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);
}
return result;
}
function fileUploadXhr(a){
var formdata=new FormData();
for(var i=0;i<a.length;i++){
formdata.append(a[i].name,a[i].value);
}
if(options.extraData){
var serializedData=deepSerialize(options.extraData);
for(i=0;i<serializedData.length;i++){
if(serializedData[i]){
formdata.append(serializedData[i][0],serializedData[i][1]);
}
}
}
options.data=null;
var s=$.extend(true,{},$.ajaxSettings,options,{
contentType:false,
processData:false,
cache:false,
type:method||'POST'
});
if(options.uploadProgress){
s.xhr=function(){
var xhr=$.ajaxSettings.xhr();
if(xhr.upload){
xhr.upload.addEventListener('progress',function(event){
var percent=0;
var position=event.loaded||event.position;
var total=event.total;
if(event.lengthComputable){
percent=Math.ceil(position/total*100);
}
options.uploadProgress(event,position,total,percent);
},false);
}
return xhr;
};
}
s.data=null;
var beforeSend=s.beforeSend;
s.beforeSend=function(xhr,o){
if(options.formData){
o.data=options.formData;
}else{
o.data=formdata;
}
if(beforeSend){
beforeSend.call(this,xhr,o);
}
};
return $.ajax(s);
}
function fileUploadIframe(a){
var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;
var deferred=$.Deferred();
deferred.abort=function(status){
xhr.abort(status);
};
if(a){
for(i=0;i<elements.length;i++){
el=$(elements[i]);
if(hasProp){
el.prop('disabled',false);
}else{
el.removeAttr('disabled');
}
}
}
s=$.extend(true,{},$.ajaxSettings,options);
s.context=s.context||s;
id='jqFormIO'+new Date().getTime();
var ownerDocument=form.ownerDocument;
var $body=$form.closest('body');
if(s.iframeTarget){
$io=$(s.iframeTarget,ownerDocument);
n=$io.attr2('name');
if(!n){
$io.attr2('name',id);
}else{
id=n;
}
}else{
$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'">',ownerDocument);
$io.css({position:'absolute',top:'-1000px',left:'-1000px'});
}
io=$io[0];
xhr={
aborted:0,
responseText:null,
responseXML:null,
status:0,
statusText:'n/a',
getAllResponseHeaders:function(){},
getResponseHeader:function(){},
setRequestHeader:function(){},
abort:function(status){
var e=(status==='timeout'?'timeout':'aborted');
log('aborting upload... '+e);
this.aborted=1;
try{
if(io.contentWindow.document.execCommand){
io.contentWindow.document.execCommand('Stop');
}
}catch(ignore){}
$io.attr('src',s.iframeSrc);
xhr.error=e;
if(s.error){
s.error.call(s.context,xhr,e,status);
}
if(g){
$.event.trigger('ajaxError',[xhr,s,e]);
}
if(s.complete){
s.complete.call(s.context,xhr,e);
}
}
};
g=s.global;
if(g&&$.active++===0){
$.event.trigger('ajaxStart');
}
if(g){
$.event.trigger('ajaxSend',[xhr,s]);
}
if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){
if(s.global){
$.active--;
}
deferred.reject();
return deferred;
}
if(xhr.aborted){
deferred.reject();
return deferred;
}
sub=form.clk;
if(sub){
n=sub.name;
if(n&&!sub.disabled){
s.extraData=s.extraData||{};
s.extraData[n]=sub.value;
if(sub.type==='image'){
s.extraData[n+'.x']=form.clk_x;
s.extraData[n+'.y']=form.clk_y;
}
}
}
var CLIENT_TIMEOUT_ABORT=1;
var SERVER_ABORT=2;
function getDoc(frame){
var doc=null;
try{
if(frame.contentWindow){
doc=frame.contentWindow.document;
}
}catch(err){
log('cannot get iframe.contentWindow document: '+err);
}
if(doc){
return doc;
}
try{
doc=frame.contentDocument?frame.contentDocument:frame.document;
}catch(err){
log('cannot get iframe.contentDocument: '+err);
doc=frame.document;
}
return doc;
}
var csrf_token=$('meta[name=csrf-token]').attr('content');
var csrf_param=$('meta[name=csrf-param]').attr('content');
if(csrf_param&&csrf_token){
s.extraData=s.extraData||{};
s.extraData[csrf_param]=csrf_token;
}
function doSubmit(){
var t=$form.attr2('target'),
a=$form.attr2('action'),
mp='multipart/form-data',
et=$form.attr('enctype')||$form.attr('encoding')||mp;
form.setAttribute('target',id);
if(!method||/post/i.test(method)){
form.setAttribute('method','POST');
}
if(a!==s.url){
form.setAttribute('action',s.url);
}
if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){
$form.attr({
encoding:'multipart/form-data',
enctype:'multipart/form-data'
});
}
if(s.timeout){
timeoutHandle=setTimeout(function(){
timedOut=true;cb(CLIENT_TIMEOUT_ABORT);
},s.timeout);
}
function checkState(){
try{
var state=getDoc(io).readyState;
log('state = '+state);
if(state&&state.toLowerCase()==='uninitialized'){
setTimeout(checkState,50);
}
}catch(e){
log('Server abort: ',e,' (',e.name,')');
cb(SERVER_ABORT);
if(timeoutHandle){
clearTimeout(timeoutHandle);
}
timeoutHandle=undefined;
}
}
var extraInputs=[];
try{
if(s.extraData){
for(var n in s.extraData){
if(s.extraData.hasOwnProperty(n)){
if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){
extraInputs.push(
$('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value)
.appendTo(form)[0]);
}else{
extraInputs.push(
$('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n])
.appendTo(form)[0]);
}
}
}
}
if(!s.iframeTarget){
$io.appendTo($body);
}
if(io.attachEvent){
io.attachEvent('onload',cb);
}else{
io.addEventListener('load',cb,false);
}
setTimeout(checkState,15);
try{
form.submit();
}catch(err){
var submitFn=document.createElement('form').submit;
submitFn.apply(form);
}
}finally{
form.setAttribute('action',a);
form.setAttribute('enctype',et);
if(t){
form.setAttribute('target',t);
}else{
$form.removeAttr('target');
}
$(extraInputs).remove();
}
}
if(s.forceSync){
doSubmit();
}else{
setTimeout(doSubmit,10);
}
var data,doc,domCheckCount=50,callbackProcessed;
function cb(e){
if(xhr.aborted||callbackProcessed){
return;
}
doc=getDoc(io);
if(!doc){
log('cannot access response document');
e=SERVER_ABORT;
}
if(e===CLIENT_TIMEOUT_ABORT&&xhr){
xhr.abort('timeout');
deferred.reject(xhr,'timeout');
return;
}
if(e===SERVER_ABORT&&xhr){
xhr.abort('server abort');
deferred.reject(xhr,'error','server abort');
return;
}
if(!doc||doc.location.href===s.iframeSrc){
if(!timedOut){
return;
}
}
if(io.detachEvent){
io.detachEvent('onload',cb);
}else{
io.removeEventListener('load',cb,false);
}
var status='success',errMsg;
try{
if(timedOut){
throw'timeout';
}
var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc);
log('isXml='+isXml);
if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){
if(--domCheckCount){
log('requeing onLoad callback, DOM not available');
setTimeout(cb,250);
return;
}
}
var docRoot=doc.body?doc.body:doc.documentElement;
xhr.responseText=docRoot?docRoot.innerHTML:null;
xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;
if(isXml){
s.dataType='xml';
}
xhr.getResponseHeader=function(header){
var headers={'content-type':s.dataType};
return headers[header.toLowerCase()];
};
if(docRoot){
xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;
xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;
}
var dt=(s.dataType||'').toLowerCase();
var scr=/(json|script|text)/.test(dt);
if(scr||s.textarea){
var ta=doc.getElementsByTagName('textarea')[0];
if(ta){
xhr.responseText=ta.value;
xhr.status=Number(ta.getAttribute('status'))||xhr.status;
xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;
}else if(scr){
var pre=doc.getElementsByTagName('pre')[0];
var b=doc.getElementsByTagName('body')[0];
if(pre){
xhr.responseText=pre.textContent?pre.textContent:pre.innerText;
}else if(b){
xhr.responseText=b.textContent?b.textContent:b.innerText;
}
}
}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){
xhr.responseXML=toXml(xhr.responseText);
}
try{
data=httpData(xhr,dt,s);
}catch(err){
status='parsererror';
xhr.error=errMsg=(err||status);
}
}catch(err){
log('error caught: ',err);
status='error';
xhr.error=errMsg=(err||status);
}
if(xhr.aborted){
log('upload aborted');
status=null;
}
if(xhr.status){
status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error';
}
if(status==='success'){
if(s.success){
s.success.call(s.context,data,'success',xhr);
}
deferred.resolve(xhr.responseText,'success',xhr);
if(g){
$.event.trigger('ajaxSuccess',[xhr,s]);
}
}else if(status){
if(typeof errMsg==='undefined'){
errMsg=xhr.statusText;
}
if(s.error){
s.error.call(s.context,xhr,status,errMsg);
}
deferred.reject(xhr,'error',errMsg);
if(g){
$.event.trigger('ajaxError',[xhr,s,errMsg]);
}
}
if(g){
$.event.trigger('ajaxComplete',[xhr,s]);
}
if(g&&!--$.active){
$.event.trigger('ajaxStop');
}
if(s.complete){
s.complete.call(s.context,xhr,status);
}
callbackProcessed=true;
if(s.timeout){
clearTimeout(timeoutHandle);
}
setTimeout(function(){
if(!s.iframeTarget){
$io.remove();
}else{
$io.attr('src',s.iframeSrc);
}
xhr.responseXML=null;
},100);
}
var toXml=$.parseXML||function(s,doc){
if(window.ActiveXObject){
doc=new ActiveXObject('Microsoft.XMLDOM');
doc.async='false';
doc.loadXML(s);
}else{
doc=(new DOMParser()).parseFromString(s,'text/xml');
}
return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null;
};
var parseJSON=$.parseJSON||function(s){
window.console.error('jquery.parseJSON is undefined');
return null;
};
var httpData=function(xhr,type,s){
var ct=xhr.getResponseHeader('content-type')||'',
xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0),
data=xml?xhr.responseXML:xhr.responseText;
if(xml&&data.documentElement.nodeName==='parsererror'){
if($.error){
$.error('parsererror');
}
}
if(s&&s.dataFilter){
data=s.dataFilter(data,type);
}
if(typeof data==='string'){
if((type==='json'||!type)&&ct.indexOf('json')>=0){
data=parseJSON(data);
}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){
$.globalEval(data);
}
}
return data;
};
return deferred;
}
};
$.fn.ajaxForm=function(options,data,dataType,onSuccess){
if(typeof options==='string'||(options===false&&arguments.length>0)){
options={
'url':options,
'data':data,
'dataType':dataType
};
if(typeof onSuccess==='function'){
options.success=onSuccess;
}
}
options=options||{};
options.delegation=options.delegation&&$.isFunction($.fn.on);
if(!options.delegation&&this.length===0){
var o={s:this.selector,c:this.context};
if(!$.isReady&&o.s){
log('DOM not ready, queuing ajaxForm');
$(function(){
$(o.s,o.c).ajaxForm(options);
});
return this;
}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));
return this;
}
if(options.delegation){
$(document)
.off('submit.form-plugin',this.selector,doAjaxSubmit)
.off('click.form-plugin',this.selector,captureSubmittingElement)
.on('submit.form-plugin',this.selector,options,doAjaxSubmit)
.on('click.form-plugin',this.selector,options,captureSubmittingElement);
return this;
}
if(options.beforeFormUnbind){
options.beforeFormUnbind(this,options);
}
return this.ajaxFormUnbind()
.on('submit.form-plugin',options,doAjaxSubmit)
.on('click.form-plugin',options,captureSubmittingElement);
};
function doAjaxSubmit(e){
var options=e.data;
if(!e.isDefaultPrevented()){
e.preventDefault();
$(e.target).closest('form').ajaxSubmit(options);
}
}
function captureSubmittingElement(e){
var target=e.target;
var $el=$(target);
if(!$el.is('[type=submit],[type=image]')){
var t=$el.closest('[type=submit]');
if(t.length===0){
return;
}
target=t[0];
}
var form=target.form;
form.clk=target;
if(target.type==='image'){
if(typeof e.offsetX!=='undefined'){
form.clk_x=e.offsetX;
form.clk_y=e.offsetY;
}else if(typeof $.fn.offset==='function'){
var offset=$el.offset();
form.clk_x=e.pageX-offset.left;
form.clk_y=e.pageY-offset.top;
}else{
form.clk_x=e.pageX-target.offsetLeft;
form.clk_y=e.pageY-target.offsetTop;
}
}
setTimeout(function(){
form.clk=form.clk_x=form.clk_y=null;
},100);
}
$.fn.ajaxFormUnbind=function(){
return this.off('submit.form-plugin click.form-plugin');
};
$.fn.formToArray=function(semantic,elements,filtering){
var a=[];
if(this.length===0){
return a;
}
var form=this[0];
var formId=this.attr('id');
var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements;
var els2;
if(els){
els=$.makeArray(els);
}
if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){
els2=$(':input[form="'+formId+'"]').get();
if(els2.length){
els=(els||[]).concat(els2);
}
}
if(!els||!els.length){
return a;
}
if($.isFunction(filtering)){
els=$.map(els,filtering);
}
var i,j,n,v,el,max,jmax;
for(i=0,max=els.length;i<max;i++){
el=els[i];
n=el.name;
if(!n||el.disabled){
continue;
}
if(semantic&&form.clk&&el.type==='image'){
if(form.clk===el){
a.push({name:n,value:$(el).val(),type:el.type});
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
}
continue;
}
v=$.fieldValue(el,true);
if(v&&v.constructor===Array){
if(elements){
elements.push(el);
}
for(j=0,jmax=v.length;j<jmax;j++){
a.push({name:n,value:v[j]});
}
}else if(feature.fileapi&&el.type==='file'){
if(elements){
elements.push(el);
}
var files=el.files;
if(files.length){
for(j=0;j<files.length;j++){
a.push({name:n,value:files[j],type:el.type});
}
}else{
a.push({name:n,value:'',type:el.type});
}
}else if(v!==null&&typeof v!=='undefined'){
if(elements){
elements.push(el);
}
a.push({name:n,value:v,type:el.type,required:el.required});
}
}
if(!semantic&&form.clk){
var $input=$(form.clk),input=$input[0];
n=input.name;
if(n&&!input.disabled&&input.type==='image'){
a.push({name:n,value:$input.val()});
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});
}
}
return a;
};
$.fn.formSerialize=function(semantic){
return $.param(this.formToArray(semantic));
};
$.fn.fieldSerialize=function(successful){
var a=[];
this.each(function(){
var n=this.name;
if(!n){
return;
}
var v=$.fieldValue(this,successful);
if(v&&v.constructor===Array){
for(var i=0,max=v.length;i<max;i++){
a.push({name:n,value:v[i]});
}
}else if(v!==null&&typeof v!=='undefined'){
a.push({name:this.name,value:v});
}
});
return $.param(a);
};
$.fn.fieldValue=function(successful){
for(var val=[],i=0,max=this.length;i<max;i++){
var el=this[i];
var v=$.fieldValue(el,successful);
if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){
continue;
}
if(v.constructor===Array){
$.merge(val,v);
}else{
val.push(v);
}
}
return val;
};
$.fieldValue=function(el,successful){
var n=el.name,t=el.type,tag=el.tagName.toLowerCase();
if(typeof successful==='undefined'){
successful=true;
}
if(successful&&(!n||el.disabled||t==='reset'||t==='button'||
(t==='checkbox'||t==='radio')&&!el.checked||
(t==='submit'||t==='image')&&el.form&&el.form.clk!==el||
tag==='select'&&el.selectedIndex===-1)){
return null;
}
if(tag==='select'){
var index=el.selectedIndex;
if(index<0){
return null;
}
var a=[],ops=el.options;
var one=(t==='select-one');
var max=(one?index+1:ops.length);
for(var i=(one?index:0);i<max;i++){
var op=ops[i];
if(op.selected&&!op.disabled){
var v=op.value;
if(!v){
v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;
}
if(one){
return v;
}
a.push(v);
}
}
return a;
}
return $(el).val().replace(rCRLF,'\r\n');
};
$.fn.clearForm=function(includeHidden){
return this.each(function(){
$('input,select,textarea',this).clearFields(includeHidden);
});
};
$.fn.clearFields=$.fn.clearInputs=function(includeHidden){
var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
return this.each(function(){
var t=this.type,tag=this.tagName.toLowerCase();
if(re.test(t)||tag==='textarea'){
this.value='';
}else if(t==='checkbox'||t==='radio'){
this.checked=false;
}else if(tag==='select'){
this.selectedIndex=-1;
}else if(t==='file'){
if(/MSIE/.test(navigator.userAgent)){
$(this).replaceWith($(this).clone(true));
}else{
$(this).val('');
}
}else if(includeHidden){
if((includeHidden===true&&/hidden/.test(t))||
(typeof includeHidden==='string'&&$(this).is(includeHidden))){
this.value='';
}
}
});
};
$.fn.resetForm=function(){
return this.each(function(){
var el=$(this);
var tag=this.tagName.toLowerCase();
switch(tag){
case'input':
this.checked=this.defaultChecked;
case'textarea':
this.value=this.defaultValue;
return true;
case'option':
case'optgroup':
var select=el.parents('select');
if(select.length&&select[0].multiple){
if(tag==='option'){
this.selected=this.defaultSelected;
}else{
el.find('option').resetForm();
}
}else{
select.resetForm();
}
return true;
case'select':
el.find('option').each(function(i){
this.selected=this.defaultSelected;
if(this.defaultSelected&&!el[0].multiple){
el[0].selectedIndex=i;
return false;
}
});
return true;
case'label':
var forEl=$(el.attr('for'));
var list=el.find('input,select,textarea');
if(forEl[0]){
list.unshift(forEl[0]);
}
list.resetForm();
return true;
case'form':
if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){
this.reset();
}
return true;
default:
el.find('form,input,label,select,textarea').resetForm();
return true;
}
});
};
$.fn.enable=function(b){
if(typeof b==='undefined'){
b=true;
}
return this.each(function(){
this.disabled=!b;
});
};
$.fn.selected=function(select){
if(typeof select==='undefined'){
select=true;
}
return this.each(function(){
var t=this.type;
if(t==='checkbox'||t==='radio'){
this.checked=select;
}else if(this.tagName.toLowerCase()==='option'){
var $sel=$(this).parent('select');
if(select&&$sel[0]&&$sel[0].type==='select-one'){
$sel.find('option').selected(false);
}
this.selected=select;
}
});
};
$.fn.ajaxSubmit.debug=false;
function log(){
if(!$.fn.ajaxSubmit.debug){
return;
}
var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');
if(window.console&&window.console.log){
window.console.log(msg);
}else if(window.opera&&window.opera.postError){
window.opera.postError(msg);
}
}
}));
/* prive/javascript/jquery.autosave.js?1749554704 */
(function($){
$.fn.autosave=function(opt){
opt=$.extend({
url:window.location,
confirm:false,
confirmstring:'Sauvegarder ?'
},opt);
var save_changed=function(){
$('form.autosavechanged')
.each(function(){
if(!opt.confirm||confirm(opt.confirmstring)){
var contenu=$(this).serialize();
var d=new Date();
contenu=contenu+"&__timestamp="+Math.round(d.getTime()/1000);
$.post(opt.url,{
'action':'session',
'var':'autosave_'+$('input[name=autosave]',this).val(),
'val':contenu
});
}
}).removeClass('autosavechanged');
};
$(window).on('unload',save_changed);
return this
.on('keyup',function(){
$(this).addClass('autosavechanged');
})
.on('change',function(){
$(this).addClass('autosavechanged');
save_changed();
})
.on('submit',function(){
save_changed();
});
};
})(jQuery);
/* prive/javascript/jquery.placeholder-label.js?1749554704 */
(function($){
$.placeholderLabel={
placeholder_class:null,
add_placeholder:function(){
if($(this).val()==$(this).attr('placeholder')){
$(this).val('').removeClass($.placeholderLabel.placeholder_class);
}
},
remove_placeholder:function(){
if($(this).val()==''){
$(this).val($(this).attr('placeholder')).addClass($.placeholderLabel.placeholder_class);
}
},
disable_placeholder_fields:function(){
$(this).find("input[placeholder]").each(function(){
if($(this).val()==$(this).attr('placeholder')){
$(this).val('');
}
});
return true;
}
};
$.fn.placeholderLabel=function(options){
var dummy=document.createElement('input');
if(dummy.placeholder!=undefined){
return this;
}
var config={
placeholder_class:'placeholder'
};
if(options)$.extend(config,options);
$.placeholderLabel.placeholder_class=config.placeholder_class;
this.each(function(){
var input=$(this);
input.focus($.placeholderLabel.add_placeholder);
input.blur($.placeholderLabel.remove_placeholder);
input.triggerHandler('focus');
input.triggerHandler('blur');
$(this.form).submit($.placeholderLabel.disable_placeholder_fields);
});
return this;
}
})(jQuery);
/* prive/javascript/ajaxCallback.js?1749554704 */
jQuery.spip=jQuery.spip||{};
jQuery.spip.log=function(){
if(jQuery.spip.debug&&window.console&&window.console.log)
window.console.log.apply(this,arguments);
}
jQuery.spip.test_espace_prive=function(){
if(typeof spipConfig.core.test_espace_prive!=undefined&&spipConfig.core.test_espace_prive){
return true;
}
return false;
}
if(!jQuery.spip.load_handlers){
jQuery.spip.load_handlers=new Array();
function onAjaxLoad(f){
jQuery.spip.load_handlers.push(f);
};
jQuery.spip.triggerAjaxLoad=function(root){
jQuery.spip.log('triggerAjaxLoad');
jQuery.spip.log(root);
for(var i=0;i<jQuery.spip.load_handlers.length;i++)
jQuery.spip.load_handlers[i].apply(root);
};
jQuery.spip.intercepted={};
jQuery.spip.intercepted.load=jQuery.fn.load;
jQuery.fn.load=function(url,params,callback){
if(typeof url!=="string"){
return jQuery.spip.intercepted.load.apply(this,arguments);
}
callback=callback||function(){};
if(params){
if(params.constructor==Function){
callback=params;
params=null;
}
}
params=jQuery.extend(params,{triggerAjaxLoad:false});
var callback2=function(){jQuery.spip.log('jQuery.load');jQuery.spip.triggerAjaxLoad(this);callback.apply(this,arguments);};
return jQuery.spip.intercepted.load.apply(this,[url,params,callback2]);
};
jQuery.spip.intercepted.ajaxSubmit=jQuery.fn.ajaxSubmit;
jQuery.fn.ajaxSubmit=function(options){
options=options||{};
if(typeof options.onAjaxLoad=="undefined"||options.onAjaxLoad!=false){
var me=jQuery(this).parents('div.ajax');
if(me.length)
me=me.parent();
else
me=document;
if(typeof options=='function')
options={success:options};
var callback=options.success||function(){};
options.success=function(){callback.apply(this,arguments);jQuery.spip.log('jQuery.ajaxSubmit');jQuery.spip.triggerAjaxLoad(me);}
}
return jQuery.spip.intercepted.ajaxSubmit.apply(this,[options]);
}
jQuery.spip.intercepted.ajax=jQuery.ajax;
jQuery.ajax=function(url,settings){
if(typeof settings=='undefined'){
settings={};
if(typeof url=='object'){
settings=url;
url=null;
}
}
if(typeof url=='string'){
settings['url']=url;
}
if(settings.data&&settings.data['triggerAjaxLoad']===false){
settings.data['triggerAjaxLoad']=null;
return jQuery.spip.intercepted.ajax(settings);
}
var s=jQuery.extend(true,{},jQuery.ajaxSettings,settings);
var callbackContext=s.context||s;
try{
if(jQuery.ajax.caller==jQuery.spip.intercepted.load||jQuery.ajax.caller==jQuery.spip.intercepted.ajaxSubmit)
return jQuery.spip.intercepted.ajax(settings);
}
catch(err){}
var orig_complete=s.complete||function(){};
settings.complete=function(res,status){
var dataType=settings.dataType;
var ct=(res&&(typeof res.getResponseHeader=='function'))
?res.getResponseHeader("content-type"):'';
var xml=!dataType&&ct&&ct.indexOf("xml")>=0;
orig_complete.call(callbackContext,res,status);
if((!dataType&&!xml)||dataType=="html"){
jQuery.spip.log('jQuery.ajax');
if(typeof s.onAjaxLoad=="undefined"||s.onAjaxLoad!=false)
jQuery.spip.triggerAjaxLoad(s.ajaxTarget?s.ajaxTarget:document);
}
};
return jQuery.spip.intercepted.ajax(settings);
};
}
jQuery.uaMatch=function(ua){
ua=ua.toLowerCase();
var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
[];
return{
browser:match[1]||"",
version:match[2]||"0"
};
};
if(!jQuery.browser){
matched=jQuery.uaMatch(navigator.userAgent);
browser={};
if(matched.browser){
browser[matched.browser]=true;
browser.version=matched.version;
}
if(browser.chrome){
browser.webkit=true;
}else if(browser.webkit){
browser.safari=true;
}
jQuery.browser=browser;
}
jQuery.getScript=function(url,callback){
return $.ajax({
url:url,
dataType:"script",
success:callback,
cache:true
});
}
jQuery.fn.positionner=function(force,setfocus){
if(!this.length){
return this;
}
var offset=jQuery(this).offset();
var hauteur=parseInt(jQuery(this).css('height'));
var marge=jQuery.spip.positionner_marge||5;
var scrolltop=self['pageYOffset']||
jQuery.boxModel&&document.documentElement['scrollTop']||
document.body['scrollTop'];
var h=jQuery(window).height();
var scroll=0;
if(force||(offset&&offset['top']-marge<=scrolltop)){
scroll=offset['top']-marge;
}
else if(offset&&offset['top']+hauteur-h+marge>scrolltop){
scroll=Math.min(offset['top']-marge-15,offset['top']+hauteur-h+40);
}
if(scroll)
jQuery('html,body')
.animate({scrollTop:scroll},300);
if(setfocus!==false)
jQuery(jQuery('*',this).filter('input[type=text],textarea')[0]).focus();
return this;
}
jQuery.spip.virtualbuffer_id='spip_virtualbufferupdate';
jQuery.spip.initReaderBuffer=function(){
if(jQuery('#'+jQuery.spip.virtualbuffer_id).length)return;
jQuery('body').append('<div style="float:left;width:0;height:0;position:absolute;left:-5000px;top:-5000px;"><input type="hidden" name="'+jQuery.spip.virtualbuffer_id+'" id="'+jQuery.spip.virtualbuffer_id+'" value="0"></div>');
}
jQuery.spip.updateReaderBuffer=function(){
var i=jQuery('#'+jQuery.spip.virtualbuffer_id);
if(!i.length)return;
i.val(parseInt(i.val())+1);
}
jQuery.fn.formulaire_setContainer=function(){
if(!this.closest('.ajax-form-container').length){
this.find('script').remove();
var aria=this.data('aria');
var $container=jQuery('<div class="ajax-form-container"></div>');
if(aria&&typeof aria==='object'){
for(var i in aria){
$container=$container.attr(i,aria[i]);
}
}
else{
aria=false;
}
this.wrap($container);
if(aria){
jQuery('form',this).not('[aria-live]').attr('aria-live','off');
}
}
return this;
}
jQuery.fn.formulaire_dyn_ajax=function(target){
if(this.length)
jQuery.spip.initReaderBuffer();
return this.each(function(){
var scrollwhensubmit=!jQuery(this).is('.noscroll');
var cible=target||this;
jQuery(cible).formulaire_setContainer();
jQuery('form:not(.noajax):not(.bouton_action_post)',this).each(function(){
var leform=this;
var leclk,leclk_x,leclk_y;
var onError=function(xhr,status,error,$form){
jQuery(leform).ajaxFormUnbind().find('input[name="var_ajax"]').remove();
var msg="Erreur";
if(typeof(error_on_ajaxform)!=="undefined")msg=error_on_ajaxform;
jQuery(leform).prepend("<p class='error ajax-error none'>"+msg+"</p>").find('.ajax-error').show('fast');
jQuery(cible).closest('.ajax-form-container').endLoading(true);
}
jQuery(this).prepend("<input type='hidden' name='var_ajax' value='form'>")
.ajaxForm({
beforeSubmit:function(){
leclk=leform.clk;
var scrollwhensubmit_button=true;
if(leclk){
scrollwhensubmit_button=!jQuery(leclk).is('.noscroll');
var n=leclk.name;
if(n&&!leclk.disabled&&leclk.type==="image"){
leclk_x=leform.clk_x;
leclk_y=leform.clk_y;
}
}
jQuery(cible).wrap('<div />');
cible=jQuery(cible).parent();
jQuery(cible).closest('.ajax-form-container').animateLoading();
if(scrollwhensubmit&&scrollwhensubmit_button){
jQuery(cible).positionner(false,false);
}
},
error:onError,
success:function(c,status,xhr,$form){
if(c.match(/^\s*noajax\s*$/)){
jQuery("input[name=var_ajax]",leform).remove();
if(leclk){
var n=leclk.name;
if(n&&!leclk.disabled){
jQuery(leform).prepend("<input type='hidden' name='"+n+"' value='"+leclk.value+"'>");
if(leclk.type==="image"){
jQuery(leform).prepend("<input type='hidden' name='"+n+".x' value='"+leform.clk_x+"'>");
jQuery(leform).prepend("<input type='hidden' name='"+n+".y' value='"+leform.clk_y+"'>");
}
}
}
jQuery(leform).ajaxFormUnbind().closest('.formulaire_spip').addClass('resubmit-noajax');
try{
leform.submit();
}catch(err){
var submitFn=document.createElement('form').submit;
submitFn.apply(leform);
}
}
else{
if(!c.length||c.indexOf("ajax-form-is-ok")==-1)
return onError.apply(this,[status,xhr,$form]);
var preloaded=jQuery.spip.preloaded_urls;
jQuery.spip.preloaded_urls={};
jQuery(cible).html(c);
var a=jQuery('a:first',cible).eq(0);
var d=jQuery('div.ajax',cible);
if(!d.length){
jQuery(cible).addClass('ajax');
if(!scrollwhensubmit)
jQuery(cible).addClass('noscroll');
}
else{
d.siblings('br.bugajaxie').remove();
cible=jQuery(":first",cible);
cible.unwrap();
}
if(a.length
&&a.is('a[name=ajax_ancre]')
&&jQuery(a.attr('href'),cible).length){
a=a.attr('href');
if(jQuery(a,cible).length)
setTimeout(function(){
jQuery(a,cible).positionner(false);
},10);
jQuery(cible).closest('.ajax-form-container').endLoading(true);
}
else{
if(a.length&&a.is('a[name=ajax_redirect]')){
a=a.get(0).href;
setTimeout(function(){
var cur=window.location.href.split('#');
document.location.replace(a);
if(cur[0]==a.split('#')[0]){
window.location.reload();
}
},10);
jQuery(cible).closest('.ajax-form-container').animateLoading();
}
else{
jQuery(cible).closest('.ajax-form-container').endLoading(true);
}
}
if(!jQuery('.reponse_formulaire_ok',cible).length)
jQuery.spip.preloaded_urls=preloaded;
jQuery.spip.updateReaderBuffer();
}
}
})
.addClass('noajax hasajax');
});
});
}
jQuery.fn.formulaire_verifier=function(callback,champ){
var erreurs={'message_erreur':'form non ajax'};
var me=this;
if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true'){
if(jQuery(me).is('form.hasajax')){
jQuery(me).ajaxSubmit({
dataType:"json",
data:{formulaire_action_verifier_json:true},
success:function(errs){
var args=[errs,champ]
if(jQuery(me).closest('.ajax-form-container').attr('aria-busy')!='true')
callback.apply(me,args);
}
});
}
else
callback.apply(me,[erreurs,champ]);
}
return this;
}
jQuery.fn.formulaire_activer_verif_auto=function(callback){
callback=callback||formulaire_actualiser_erreurs;
var me=jQuery(this).closest('.ajax-form-container');
var check=function(){
var name=jQuery(this).attr('name');
setTimeout(function(){me.find('form').formulaire_verifier(callback,name);},50);
}
var activer=function(){
if(me.find('form').attr('data-verifjson')!='on'){
me
.find('form')
.attr('data-verifjson','on')
.find('input,select,textarea')
.on('change',check);
}
}
jQuery(activer);
onAjaxLoad(function(){setTimeout(activer,150);});
}
function formulaire_actualiser_erreurs(erreurs){
var parent=jQuery(this).closest('.formulaire_spip');
if(!parent.length)return;
parent.find('.reponse_formulaire,.erreur_message').fadeOut().remove();
parent.find('.erreur').removeClass('erreur');
if(erreurs['message_ok'])
parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_ok">'+erreurs['message_ok']+'</p>');
if(erreurs['message_erreur'])
parent.find('form').before('<p class="reponse_formulaire reponse_formulaire_erreur">'+erreurs['message_erreur']+'</p>');
for(var k in erreurs){
var saisie=parent.find('.editer_'+k);
if(saisie.length){
saisie.addClass('erreur');
saisie.find('label').after('<span class="erreur_message">'+erreurs[k]+'</span>');
}
}
}
var ajax_confirm=true;
var ajax_confirm_date=0;
var spip_confirm=window.confirm;
function _confirm(message){
ajax_confirm=spip_confirm(message);
if(!ajax_confirm){
var d=new Date();
ajax_confirm_date=d.getTime();
}
return ajax_confirm;
}
window.confirm=_confirm;
var ajaxbloc_selecteur;
jQuery.spip.preloaded_urls={};
jQuery.spip.on_ajax_loaded=function(blocfrag,c,href,history){
history=history||(history==null);
if(typeof href==undefined||href==null)
history=false;
if(history)
jQuery.spip.setHistoryState(blocfrag);
if(jQuery(blocfrag).attr('data-loaded-callback')){
var callback=eval(jQuery(blocfrag).attr('data-loaded-callback'));
callback.call(blocfrag,c,href,history);
}
else{
jQuery(blocfrag)
.html(c)
.endLoading();
}
if(typeof href!=undefined)
jQuery(blocfrag).attr('data-url',href);
if(history){
var href_history=href;
if(href_history.indexOf('var_nullify')!==-1){
href_history=parametre_url(href_history,'var_nullify','');
}
jQuery.spip.pushHistoryState(href_history);
jQuery.spip.setHistoryState(blocfrag);
}
var a=jQuery('a:first',jQuery(blocfrag)).eq(0);
if(a.length
&&a.is('a[name=ajax_ancre]')
&&jQuery(a.attr('href'),blocfrag).length){
a=a.attr('href');
jQuery(a,blocfrag).positionner(false);
}
jQuery.spip.log('on_ajax_loaded');
jQuery.spip.triggerAjaxLoad(blocfrag);
a=jQuery(blocfrag).parents('form.hasajax')
if(a.length)
a.eq(0).removeClass('noajax').parents('div.ajax').formulaire_dyn_ajax();
jQuery.spip.updateReaderBuffer();
}
jQuery.spip.on_ajax_failed=function(blocfrag,statusCode,href,history){
jQuery(blocfrag).addClass('invalid');
jQuery.spip.log("Echec AJAX statusCode "+statusCode)
history=history||(history==null);
if(history){
if(jQuery.spip.debug){
jQuery.spip.log("On redirige sur sur "+href)
}
else{
window.location.href=href;
}
}
}
jQuery.spip.stateId=0;
jQuery.spip.setHistoryState=function(blocfrag){
if(!window.history.replaceState)return;
if(!blocfrag.attr('id')){
while(jQuery('#ghsid'+jQuery.spip.stateId).length)
jQuery.spip.stateId++;
blocfrag.attr('id','ghsid'+jQuery.spip.stateId);
}
var href=blocfrag.attr('data-url')||blocfrag.attr('data-origin');
href=jQuery("<"+"a href='"+href+"'></a>").get(0).href;
var state={
id:blocfrag.attr('id'),
href:href
};
var ajaxid=blocfrag.attr('class').match(/\bajax-id-[\w-]+\b/);
if(ajaxid&&ajaxid.length)
state["ajaxid"]=ajaxid[0];
window.history.replaceState(state,window.document.title,window.document.location);
}
jQuery.spip.pushHistoryState=function(href,title){
if(!window.history.pushState)
return false;
window.history.pushState({},title,href);
}
window.onpopstate=function(popState){
if(popState.state&&popState.state.href){
var blocfrag=false;
if(popState.state.id){
blocfrag=jQuery('#'+popState.state.id);
}
if((!blocfrag||!blocfrag.length)&&popState.state.ajaxid){
blocfrag=jQuery('.ajaxbloc.'+popState.state.ajaxid);
}
if(blocfrag&&blocfrag.length==1){
jQuery.spip.ajaxClick(blocfrag,popState.state.href,{history:false});
return true;
}
else{
window.location.href=popState.state.href;
}
}
}
jQuery.spip.loadAjax=function(blocfrag,url,href,options){
var force=options.force||false;
if(jQuery(blocfrag).attr('data-loading-callback')){
var callback=eval(jQuery(blocfrag).attr('data-loading-callback'));
callback.call(blocfrag,url,href,options);
}
else{
jQuery(blocfrag).animateLoading();
}
if(jQuery.spip.preloaded_urls[url]&&!force){
if(jQuery.spip.preloaded_urls[url]=="<!--loading-->"){
setTimeout(function(){jQuery.spip.loadAjax(blocfrag,url,href,options);},100);
return;
}
jQuery.spip.on_ajax_loaded(blocfrag,jQuery.spip.preloaded_urls[url],href,options.history);
}else{
var d=new Date();
jQuery.spip.preloaded_urls[url]="<!--loading-->";
jQuery.ajax({
url:parametre_url(url,'var_t',d.getTime()),
onAjaxLoad:false,
success:function(c){
jQuery.spip.on_ajax_loaded(blocfrag,c,href,options.history);
jQuery.spip.preloaded_urls[url]=c;
if(options.callback&&typeof options.callback=="function")
options.callback.apply(blocfrag);
},
error:function(e){
jQuery.spip.preloaded_urls[url]='';
jQuery.spip.on_ajax_failed(blocfrag,e.status,href,options.history);
}
});
}
}
jQuery.spip.makeAjaxUrl=function(href,ajax_env,origin){
var url=href.split('#');
url[0]=parametre_url(url[0],'var_ajax',1);
url[0]=parametre_url(url[0],'var_ajax_env',ajax_env);
if(origin){
if(origin.indexOf('var_nullify')!==-1){
origin=parametre_url(origin,'var_nullify','');
}
var p=origin.indexOf('?');
var nullify=[];
if(p!==-1){
var args=origin.substring(p+1).split('&');
var val;
var arg;
for(var n=0;n<args.length;n++){
arg=args[n].split('=');
arg=decodeURIComponent(arg[0]);
p=arg.indexOf('[');
if(p!==-1)
arg=arg.substring(0,p);
val=parametre_url(href,arg);
if((typeof val=="undefined"||val==null)&&nullify.indexOf(arg)===-1){
nullify.push(arg);
}
}
if(nullify.length){
url[0]=url[0]+'&'+'var_nullify='+encodeURIComponent(nullify.join('|'));
}
}
}
if(url[1])
url[0]=parametre_url(url[0],'var_ajax_ancre',url[1]);
return url[0];
}
jQuery.spip.ajaxReload=function(blocfrag,options){
var ajax_env=blocfrag.attr('data-ajax-env');
if(!ajax_env||ajax_env==undefined)return;
var href=options.href||blocfrag.attr('data-url')||blocfrag.attr('data-origin');
if(href&&typeof href!=undefined){
if(href.indexOf('var_nullify')!==-1){
href=parametre_url(href,'var_nullify','');
}
options=options||{};
var callback=options.callback||null;
var history=options.history||false;
var args=options.args||{};
for(var key in args){
href=parametre_url(href,key,args[key]==undefined?'':args[key],'&',args[key]==undefined?false:true);
}
var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
jQuery.spip.loadAjax(blocfrag,url,href,{force:true,callback:callback,history:history});
return true;
}
}
jQuery.spip.ajaxClick=function(blocfrag,href,options){
var ajax_env=blocfrag.attr('data-ajax-env');
if(!ajax_env||ajax_env==undefined)return;
if(!ajax_confirm){
ajax_confirm=true;
var d=new Date();
if((d.getTime()-ajax_confirm_date)<=2)
return false;
}
var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
jQuery.spip.loadAjax(blocfrag,url,href,options);
return false;
}
jQuery.fn.ajaxbloc=function(){
if(this.length)
jQuery.spip.initReaderBuffer();
if(ajaxbloc_selecteur==undefined)
ajaxbloc_selecteur='.pagination a,a.ajax';
return this.each(function(){
jQuery('div.ajaxbloc',this).ajaxbloc();
var blocfrag=jQuery(this);
var ajax_env=blocfrag.attr('data-ajax-env');
if(!ajax_env||ajax_env==undefined)return;
blocfrag.not('.bind-ajaxReload').on('ajaxReload',function(event,options){
if(jQuery.spip.ajaxReload(blocfrag,options))
event.stopPropagation();
}).addClass('bind-ajaxReload');
jQuery(ajaxbloc_selecteur,this).not('.noajax,.bind-ajax')
.click(function(){return jQuery.spip.ajaxClick(blocfrag,this.href,{force:jQuery(this).is('.nocache'),history:!(jQuery(this).is('.nohistory')||jQuery(this).closest('.box_modalbox').length)});})
.addClass('bind-ajax')
.filter('.preload').each(function(){
var href=this.href;
var url=jQuery.spip.makeAjaxUrl(href,ajax_env,blocfrag.attr('data-origin'));
if(!jQuery.spip.preloaded_urls[url]){
jQuery.spip.preloaded_urls[url]='<!--loading-->';
jQuery.ajax({url:url,onAjaxLoad:false,success:function(r){jQuery.spip.preloaded_urls[url]=r;},error:function(){jQuery.spip.preloaded_urls[url]='';}});
}
});
jQuery('form.bouton_action_post.ajax',this).not('.noajax,.bind-ajax').each(function(){
var leform=this;
var url=jQuery(this).attr('action').split('#');
var scrollwhensubmit=(!jQuery(this).is('.noscroll')&&!jQuery('.submit',this).is('.noscroll'));
jQuery(this)
.prepend("<input type='hidden' name='var_ajax' value='1'><input type='hidden' name='var_ajax_env' value='"+(ajax_env)+"'>"+(url[1]?"<input type='hidden' name='var_ajax_ancre' value='"+url[1]+"'>":""))
.ajaxForm({
beforeSubmit:function(){
jQuery(blocfrag).animateLoading();
if(scrollwhensubmit){
jQuery(blocfrag).positionner(false);
}
},
onAjaxLoad:false,
success:function(c){
jQuery.spip.on_ajax_loaded(blocfrag,c);
jQuery.spip.preloaded_urls={};
},
error:function(e){
jQuery.spip.preloaded_urls={};
var href=parametre_url(url,'redirect');
if(!href){
href=window.location.href;
}
jQuery.spip.on_ajax_failed(blocfrag,e.status,href,e.status===400);
}
})
.addClass('bind-ajax');
});
});
};
jQuery.fn.followLink=function(){
$(this).click();
if(!$(this).is('.bind-ajax'))
window.location.href=$(this).get(0).href;
return this;
}
function ajaxReload(ajaxid,options){
jQuery('div.ajaxbloc.ajax-id-'+ajaxid).ajaxReload(options);
}
jQuery.fn.ajaxReload=function(options){
options=options||{};
jQuery(this).trigger('ajaxReload',[options]);
return this;
}
jQuery.fn.animateLoading=function(){
this.attr('aria-busy','true').addClass('loading').children().css('opacity',0.5);
if(typeof ajax_image_searching!='undefined'){
var i=(this).find('.image_loading');
if(i.length)i.eq(0).html(ajax_image_searching);
else this.prepend('<span class="image_loading">'+ajax_image_searching+'</span>');
}
return this;
}
jQuery.fn.animeajax=jQuery.fn.animateLoading;
jQuery.fn.endLoading=function(hard){
hard=hard||false;
this.attr('aria-busy','false').removeClass('loading');
if(hard){
this.children().css('opacity','');
this.find('.image_loading').html('');
}
return this;
}
jQuery.fn.animateRemove=function(callback){
if(this.length){
var me=this;
var color=$("<div class='remove'></div>").css('background-color');
var sel=$(this);
if(sel.is('tr'))
sel=sel.add('>td',sel);
sel.addClass('remove').css({backgroundColor:color}).animate({opacity:"0.0"},'fast',function(){
sel.removeClass('remove').css({backgroundColor:''});
if(callback)
callback.apply(me);
});
}
return this;
}
jQuery.fn.animateAppend=function(callback){
if(this.length){
var me=this;
var color=$("<div class='append'></div>").css('background-color');
var origin=$(this).css('background-color')||'#ffffff';
if(origin=='transparent')origin='#ffffff';
var sel=$(this);
if(sel.is('tr'))
sel=sel.add('>td',sel);
sel.css('opacity','0.0').addClass('append').css({backgroundColor:color}).animate({opacity:"1.0"},1000,function(){
sel.animate({backgroundColor:origin},3000,function(){
sel.removeClass('append').css({backgroundColor:''});
if(callback)
callback.apply(me);
});
});
}
return this;
}
function parametre_url(url,c,v,sep,force_vide){
if(typeof(url)=='undefined'){
url='';
}
var p;
var ancre='';
var a='./';
var args=[];
p=url.indexOf('#');
if(p!=-1){
ancre=url.substring(p);
url=url.substring(0,p);
}
p=url.indexOf('?');
if(p!==-1){
if(p>0)a=url.substring(0,p);
args=url.substring(p+1).split('&');
}
else
a=url;
var regexp=new RegExp('^('+c.replace('[]','\\[\\]')+'\\[?\\]?)(=.*)?$');
var ajouts=[];
var u=(typeof(v)!=='object')?encodeURIComponent(v):v;
var na=[];
var v_read=null;
for(var n=0;n<args.length;n++){
var val=args[n];
try{
val=decodeURIComponent(val);
}catch(e){}
var r=val.match(regexp);
if(r&&r.length){
if(v==null){
if(r[1].substr(-2)=='[]'){
if(!v_read)v_read=[];
v_read.push((r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'');
}
else{
return(r.length>2&&typeof r[2]!=='undefined')?r[2].substring(1):'';
}
}
else if(!v.length){
}
else if(r[1].substr(-2)!='[]'){
na.push(r[1]+'='+u);
ajouts.push(r[1]);
}
}
else
na.push(args[n]);
}
if(v==null)return v_read;
if(v||v.length||force_vide){
ajouts="="+ajouts.join("=")+"=";
var all=c.split('|');
for(n=0;n<all.length;n++){
if(ajouts.search("="+all[n]+"=")==-1){
if(typeof(v)!=='object'){
na.push(all[n]+'='+u);
}
else{
var id=((all[n].substring(-2)=='[]')?all[n]:all[n]+"[]");
for(p=0;p<v.length;p++)
na.push(id+'='+encodeURIComponent(v[p]));
}
}
}
}
if(na.length){
if(!sep)sep='&';
a=a+"?"+na.join(sep);
}
return a+ancre;
}
function spip_logo_survol_hover(){
var me=jQuery(this);
if(me.attr('data-src-hover')){
me.attr('data-src-original',me.attr('src'));
me.attr('src',me.attr('data-src-hover'));
}
}
function spip_logo_survol_out(){
var me=jQuery(this);
if(me.attr('data-src-original')){
me.attr('src',me.attr('data-src-original'));
}
}
function disableClickAfterFormSubmit(){
if(jQuery(this).is('.processing-submitted-form')){
return false;
}
jQuery(this)
.addClass('processing-submitted-form')
.find('button[type="submit"]')
.attr('disabled','disabled')
.addClass('disabled')
}
function puce_enable_survol(){
jQuery('span.puce_objet_popup a',this).not('.puce-survol-enabled').click(function(){
selec_statut(jQuery(this).attr('data-puce-id'),jQuery(this).attr('data-puce-type'),jQuery(this).attr('data-puce-decal'),jQuery('img',this).attr('src'),jQuery(this).attr('data-puce-action'));
return false;
}).addClass('puce-survol-enabled');
jQuery('span.puce_objet',this).not('.puce-survol-enabled').mouseover(function(){
if(!this.puce_loaded){
this.puce_loaded=true;prepare_selec_statut(this,jQuery(this).attr('data-puce-nom'),jQuery(this).attr('data-puce-type'),jQuery(this).attr('data-puce-id'),jQuery(this).attr('data-puce-action'));
}
}).addClass('puce-survol-enabled');
}
if(!window.var_zajax_content)
window.var_zajax_content='contenu';
jQuery(function(){
jQuery('form:not(.bouton_action_post)').parents('div.ajax')
.formulaire_dyn_ajax();
jQuery('div.ajaxbloc').ajaxbloc();
jQuery("input[placeholder]:text").placeholderLabel();
jQuery('.spip_logo_survol').hover(spip_logo_survol_hover,spip_logo_survol_out);
puce_enable_survol.apply(this);
jQuery('body').on('submit','form.bouton_action_post',disableClickAfterFormSubmit);
});
onAjaxLoad(function(){
if(jQuery){
jQuery('form:not(.bouton_action_post)',this).parents('div.ajax')
.formulaire_dyn_ajax();
if(jQuery(this).is('div.ajaxbloc'))
jQuery(this).ajaxbloc();
else if(jQuery(this).closest('div.ajaxbloc').length)
jQuery(this).closest('div.ajaxbloc').ajaxbloc();
else
jQuery('div.ajaxbloc',this).ajaxbloc();
jQuery("input[placeholder]:text",this).placeholderLabel();
jQuery('.spip_logo_survol',this).hover(spip_logo_survol_hover,spip_logo_survol_out);
puce_enable_survol.apply(this);
}
});
/* prive/javascript/js.cookie.js?1749554704 */
;
(function(global,factory){
typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():
typeof define==='function'&&define.amd?define(factory):
(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){
var current=global.Cookies;
var exports=global.Cookies=factory();
exports.noConflict=function(){global.Cookies=current;return exports;};
})());
})(this,(function(){'use strict';
function assign(target){
for(var i=1;i<arguments.length;i++){
var source=arguments[i];
for(var key in source){
target[key]=source[key];
}
}
return target
}
var defaultConverter={
read:function(value){
if(value[0]==='"'){
value=value.slice(1,-1);
}
return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)
},
write:function(value){
return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
decodeURIComponent
)
}
};
function init(converter,defaultAttributes){
function set(name,value,attributes){
if(typeof document==='undefined'){
return
}
attributes=assign({},defaultAttributes,attributes);
if(typeof attributes.expires==='number'){
attributes.expires=new Date(Date.now()+attributes.expires*864e5);
}
if(attributes.expires){
attributes.expires=attributes.expires.toUTCString();
}
name=encodeURIComponent(name)
.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent)
.replace(/[()]/g,escape);
var stringifiedAttributes='';
for(var attributeName in attributes){
if(!attributes[attributeName]){
continue
}
stringifiedAttributes+='; '+attributeName;
if(attributes[attributeName]===true){
continue
}
stringifiedAttributes+='='+attributes[attributeName].split(';')[0];
}
return(document.cookie=
name+'='+converter.write(value,name)+stringifiedAttributes)
}
function get(name){
if(typeof document==='undefined'||(arguments.length&&!name)){
return
}
var cookies=document.cookie?document.cookie.split('; '):[];
var jar={};
for(var i=0;i<cookies.length;i++){
var parts=cookies[i].split('=');
var value=parts.slice(1).join('=');
try{
var found=decodeURIComponent(parts[0]);
jar[found]=converter.read(value,found);
if(name===found){
break
}
}catch(e){}
}
return name?jar[name]:jar
}
return Object.create(
{
set,
get,
remove:function(name,attributes){
set(
name,
'',
assign({},attributes,{
expires:-1
})
);
},
withAttributes:function(attributes){
return init(this.converter,assign({},this.attributes,attributes))
},
withConverter:function(converter){
return init(assign({},this.converter,converter),this.attributes)
}
},
{
attributes:{value:Object.freeze(defaultAttributes)},
converter:{value:Object.freeze(converter)}
}
)
}
var api=init(defaultConverter,{path:'/'});
return api;
}));
/* plugins/auto/select2/v2.1.0/javascript/select2.fork.full.js?1720198650 */
;(function(factory){
if(typeof define==='function'&&define.amd){
define(['jquery'],factory);
}else if(typeof module==='object'&&module.exports){
module.exports=function(root,jQuery){
if(jQuery===undefined){
if(typeof window!=='undefined'){
jQuery=require('jquery');
}
else{
jQuery=require('jquery')(root);
}
}
factory(jQuery);
return jQuery;
};
}else{
factory(jQuery);
}
}(function(jQuery){
var S2=(function(){
if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd){
var S2=jQuery.fn.select2.amd;
}
var S2;(function(){if(!S2||!S2.requirejs){
if(!S2){S2={};}else{require=S2;}
var requirejs,require,define;
(function(undef){
var main,req,makeMap,handlers,
defined={},
waiting={},
config={},
defining={},
hasOwn=Object.prototype.hasOwnProperty,
aps=[].slice,
jsSuffixRegExp=/\.js$/;
function hasProp(obj,prop){
return hasOwn.call(obj,prop);
}
function normalize(name,baseName){
var nameParts,nameSegment,mapValue,foundMap,lastIndex,
foundI,foundStarMap,starI,i,j,part,normalizedBaseParts,
baseParts=baseName&&baseName.split("/"),
map=config.map,
starMap=(map&&map['*'])||{};
if(name){
name=name.split('/');
lastIndex=name.length-1;
if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){
name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,'');
}
if(name[0].charAt(0)==='.'&&baseParts){
normalizedBaseParts=baseParts.slice(0,baseParts.length-1);
name=normalizedBaseParts.concat(name);
}
for(i=0;i<name.length;i++){
part=name[i];
if(part==='.'){
name.splice(i,1);
i-=1;
}else if(part==='..'){
if(i===0||(i===1&&name[2]==='..')||name[i-1]==='..'){
continue;
}else if(i>0){
name.splice(i-1,2);
i-=2;
}
}
}
name=name.join('/');
}
if((baseParts||starMap)&&map){
nameParts=name.split('/');
for(i=nameParts.length;i>0;i-=1){
nameSegment=nameParts.slice(0,i).join("/");
if(baseParts){
for(j=baseParts.length;j>0;j-=1){
mapValue=map[baseParts.slice(0,j).join('/')];
if(mapValue){
mapValue=mapValue[nameSegment];
if(mapValue){
foundMap=mapValue;
foundI=i;
break;
}
}
}
}
if(foundMap){
break;
}
if(!foundStarMap&&starMap&&starMap[nameSegment]){
foundStarMap=starMap[nameSegment];
starI=i;
}
}
if(!foundMap&&foundStarMap){
foundMap=foundStarMap;
foundI=starI;
}
if(foundMap){
nameParts.splice(0,foundI,foundMap);
name=nameParts.join('/');
}
}
return name;
}
function makeRequire(relName,forceSync){
return function(){
var args=aps.call(arguments,0);
if(typeof args[0]!=='string'&&args.length===1){
args.push(null);
}
return req.apply(undef,args.concat([relName,forceSync]));
};
}
function makeNormalize(relName){
return function(name){
return normalize(name,relName);
};
}
function makeLoad(depName){
return function(value){
defined[depName]=value;
};
}
function callDep(name){
if(hasProp(waiting,name)){
var args=waiting[name];
delete waiting[name];
defining[name]=true;
main.apply(undef,args);
}
if(!hasProp(defined,name)&&!hasProp(defining,name)){
throw new Error('No '+name);
}
return defined[name];
}
function splitPrefix(name){
var prefix,
index=name?name.indexOf('!'):-1;
if(index>-1){
prefix=name.substring(0,index);
name=name.substring(index+1,name.length);
}
return[prefix,name];
}
function makeRelParts(relName){
return relName?splitPrefix(relName):[];
}
makeMap=function(name,relParts){
var plugin,
parts=splitPrefix(name),
prefix=parts[0],
relResourceName=relParts[1];
name=parts[1];
if(prefix){
prefix=normalize(prefix,relResourceName);
plugin=callDep(prefix);
}
if(prefix){
if(plugin&&plugin.normalize){
name=plugin.normalize(name,makeNormalize(relResourceName));
}else{
name=normalize(name,relResourceName);
}
}else{
name=normalize(name,relResourceName);
parts=splitPrefix(name);
prefix=parts[0];
name=parts[1];
if(prefix){
plugin=callDep(prefix);
}
}
return{
f:prefix?prefix+'!'+name:name,
n:name,
pr:prefix,
p:plugin
};
};
function makeConfig(name){
return function(){
return(config&&config.config&&config.config[name])||{};
};
}
handlers={
require:function(name){
return makeRequire(name);
},
exports:function(name){
var e=defined[name];
if(typeof e!=='undefined'){
return e;
}else{
return(defined[name]={});
}
},
module:function(name){
return{
id:name,
uri:'',
exports:defined[name],
config:makeConfig(name)
};
}
};
main=function(name,deps,callback,relName){
var cjsModule,depName,ret,map,i,relParts,
args=[],
callbackType=typeof callback,
usingExports;
relName=relName||name;
relParts=makeRelParts(relName);
if(callbackType==='undefined'||callbackType==='function'){
deps=!deps.length&&callback.length?['require','exports','module']:deps;
for(i=0;i<deps.length;i+=1){
map=makeMap(deps[i],relParts);
depName=map.f;
if(depName==="require"){
args[i]=handlers.require(name);
}else if(depName==="exports"){
args[i]=handlers.exports(name);
usingExports=true;
}else if(depName==="module"){
cjsModule=args[i]=handlers.module(name);
}else if(hasProp(defined,depName)||
hasProp(waiting,depName)||
hasProp(defining,depName)){
args[i]=callDep(depName);
}else if(map.p){
map.p.load(map.n,makeRequire(relName,true),makeLoad(depName),{});
args[i]=defined[depName];
}else{
throw new Error(name+' missing '+depName);
}
}
ret=callback?callback.apply(defined[name],args):undefined;
if(name){
if(cjsModule&&cjsModule.exports!==undef&&
cjsModule.exports!==defined[name]){
defined[name]=cjsModule.exports;
}else if(ret!==undef||!usingExports){
defined[name]=ret;
}
}
}else if(name){
defined[name]=callback;
}
};
requirejs=require=req=function(deps,callback,relName,forceSync,alt){
if(typeof deps==="string"){
if(handlers[deps]){
return handlers[deps](callback);
}
return callDep(makeMap(deps,makeRelParts(callback)).f);
}else if(!deps.splice){
config=deps;
if(config.deps){
req(config.deps,config.callback);
}
if(!callback){
return;
}
if(callback.splice){
deps=callback;
callback=relName;
relName=null;
}else{
deps=undef;
}
}
callback=callback||function(){};
if(typeof relName==='function'){
relName=forceSync;
forceSync=alt;
}
if(forceSync){
main(undef,deps,callback,relName);
}else{
setTimeout(function(){
main(undef,deps,callback,relName);
},4);
}
return req;
};
req.config=function(cfg){
return req(cfg);
};
requirejs._defined=defined;
define=function(name,deps,callback){
if(typeof name!=='string'){
throw new Error('See almond README: incorrect module build, no module name');
}
if(!deps.splice){
callback=deps;
deps=[];
}
if(!hasProp(defined,name)&&!hasProp(waiting,name)){
waiting[name]=[name,deps,callback];
}
};
define.amd={
jQuery:true
};
}());
S2.requirejs=requirejs;S2.require=require;S2.define=define;
}
}());
S2.define("almond",function(){});
S2.define('jquery',[],function(){
var _$=jQuery||$;
if(_$==null&&console&&console.error){
console.error(
'Select2: An instance of jQuery or a jQuery-compatible library was not '+
'found. Make sure that you are including jQuery before Select2 on your '+
'web page.'
);
}
return _$;
});
S2.define('select2/utils',[
'jquery'
],function($){
var Utils={};
Utils.Extend=function(ChildClass,SuperClass){
var __hasProp={}.hasOwnProperty;
function BaseConstructor(){
this.constructor=ChildClass;
}
for(var key in SuperClass){
if(__hasProp.call(SuperClass,key)){
ChildClass[key]=SuperClass[key];
}
}
BaseConstructor.prototype=SuperClass.prototype;
ChildClass.prototype=new BaseConstructor();
ChildClass.__super__=SuperClass.prototype;
return ChildClass;
};
function getMethods(theClass){
var proto=theClass.prototype;
var methods=[];
for(var methodName in proto){
var m=proto[methodName];
if(typeof m!=='function'){
continue;
}
if(methodName==='constructor'){
continue;
}
methods.push(methodName);
}
return methods;
}
Utils.Decorate=function(SuperClass,DecoratorClass){
var decoratedMethods=getMethods(DecoratorClass);
var superMethods=getMethods(SuperClass);
function DecoratedClass(){
var unshift=Array.prototype.unshift;
var argCount=DecoratorClass.prototype.constructor.length;
var calledConstructor=SuperClass.prototype.constructor;
if(argCount>0){
unshift.call(arguments,SuperClass.prototype.constructor);
calledConstructor=DecoratorClass.prototype.constructor;
}
calledConstructor.apply(this,arguments);
}
DecoratorClass.displayName=SuperClass.displayName;
function ctr(){
this.constructor=DecoratedClass;
}
DecoratedClass.prototype=new ctr();
for(var m=0;m<superMethods.length;m++){
var superMethod=superMethods[m];
DecoratedClass.prototype[superMethod]=
SuperClass.prototype[superMethod];
}
var calledMethod=function(methodName){
var originalMethod=function(){};
if(methodName in DecoratedClass.prototype){
originalMethod=DecoratedClass.prototype[methodName];
}
var decoratedMethod=DecoratorClass.prototype[methodName];
return function(){
var unshift=Array.prototype.unshift;
unshift.call(arguments,originalMethod);
return decoratedMethod.apply(this,arguments);
};
};
for(var d=0;d<decoratedMethods.length;d++){
var decoratedMethod=decoratedMethods[d];
DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod);
}
return DecoratedClass;
};
var Observable=function(){
this.listeners={};
};
Observable.prototype.on=function(event,callback){
this.listeners=this.listeners||{};
if(event in this.listeners){
this.listeners[event].push(callback);
}else{
this.listeners[event]=[callback];
}
};
Observable.prototype.trigger=function(event){
var slice=Array.prototype.slice;
var params=slice.call(arguments,1);
this.listeners=this.listeners||{};
if(params==null){
params=[];
}
if(params.length===0){
params.push({});
}
params[0]._type=event;
if(event in this.listeners){
this.invoke(this.listeners[event],slice.call(arguments,1));
}
if('*'in this.listeners){
this.invoke(this.listeners['*'],arguments);
}
};
Observable.prototype.invoke=function(listeners,params){
for(var i=0,len=listeners.length;i<len;i++){
listeners[i].apply(this,params);
}
};
Utils.Observable=Observable;
Utils.generateChars=function(length){
var chars='';
for(var i=0;i<length;i++){
var randomChar=Math.floor(Math.random()*36);
chars+=randomChar.toString(36);
}
return chars;
};
Utils.bind=function(func,context){
return function(){
func.apply(context,arguments);
};
};
Utils._convertData=function(data){
for(var originalKey in data){
var keys=originalKey.split('-');
var dataLevel=data;
if(keys.length===1){
continue;
}
for(var k=0;k<keys.length;k++){
var key=keys[k];
key=key.substring(0,1).toLowerCase()+key.substring(1);
if(!(key in dataLevel)){
dataLevel[key]={};
}
if(k==keys.length-1){
dataLevel[key]=data[originalKey];
}
dataLevel=dataLevel[key];
}
delete data[originalKey];
}
return data;
};
Utils.hasScroll=function(index,el){
var $el=$(el);
var overflowX=el.style.overflowX;
var overflowY=el.style.overflowY;
if(overflowX===overflowY&&
(overflowY==='hidden'||overflowY==='visible')){
return false;
}
if(overflowX==='scroll'||overflowY==='scroll'){
return true;
}
return($el.innerHeight()<el.scrollHeight||
$el.innerWidth()<el.scrollWidth);
};
Utils.escapeMarkup=function(markup){
var replaceMap={
'\\':'\',
'&':'&',
'<':'<',
'>':'>',
'"':'"',
'\'':''',
'/':'/'
};
if(typeof markup!=='string'){
return markup;
}
return String(markup).replace(/[&<>"'\/\\]/g,function(match){
return replaceMap[match];
});
};
Utils.appendMany=function($element,$nodes){
if($.fn.jquery.substr(0,3)==='1.7'){
var $jqNodes=$();
$.map($nodes,function(node){
$jqNodes=$jqNodes.add(node);
});
$nodes=$jqNodes;
}
$element.append($nodes);
};
Utils.__cache={};
var id=0;
Utils.GetUniqueElementId=function(element){
var select2Id=element.getAttribute('data-select2-id');
if(select2Id==null){
if(element.id){
select2Id=element.id;
element.setAttribute('data-select2-id',select2Id);
}else{
element.setAttribute('data-select2-id',++id);
select2Id=id.toString();
}
}
return select2Id;
};
Utils.StoreData=function(element,name,value){
var id=Utils.GetUniqueElementId(element);
if(!Utils.__cache[id]){
Utils.__cache[id]={};
}
Utils.__cache[id][name]=value;
};
Utils.GetData=function(element,name){
var id=Utils.GetUniqueElementId(element);
if(name){
if(Utils.__cache[id]){
if(Utils.__cache[id][name]!=null){
return Utils.__cache[id][name];
}
return $(element).data(name);
}
return $(element).data(name);
}else{
return Utils.__cache[id];
}
};
Utils.RemoveData=function(element){
var id=Utils.GetUniqueElementId(element);
if(Utils.__cache[id]!=null){
delete Utils.__cache[id];
}
element.removeAttribute('data-select2-id');
};
return Utils;
});
S2.define('select2/results',[
'jquery',
'./utils'
],function($,Utils){
function Results($element,options,dataAdapter){
this.$element=$element;
this.data=dataAdapter;
this.options=options;
Results.__super__.constructor.call(this);
}
Utils.Extend(Results,Utils.Observable);
Results.prototype.render=function(){
var $results=$(
'<ul class="select2-results__options" role="listbox"></ul>'
);
if(this.options.get('multiple')){
$results.attr('aria-multiselectable','true');
}
this.$results=$results;
return $results;
};
Results.prototype.clear=function(){
this.$results.empty();
};
Results.prototype.displayMessage=function(params){
var escapeMarkup=this.options.get('escapeMarkup');
this.clear();
this.hideLoading();
var $message=$(
'<li role="alert" aria-live="assertive"'+
' class="select2-results__option"></li>'
);
var message=this.options.get('translations').get(params.message);
$message.append(
escapeMarkup(
message(params.args)
)
);
$message[0].className+=' select2-results__message';
this.$results.append($message);
};
Results.prototype.hideMessages=function(){
this.$results.find('.select2-results__message').remove();
};
Results.prototype.append=function(data){
this.hideLoading();
var $options=[];
if(data.results==null||data.results.length===0){
if(this.$results.children().length===0){
this.trigger('results:message',{
message:'noResults'
});
}
return;
}
data.results=this.sort(data.results);
for(var d=0;d<data.results.length;d++){
var item=data.results[d];
var $option=this.option(item);
$options.push($option);
}
this.$results.append($options);
};
Results.prototype.position=function($results,$dropdown){
var $resultsContainer=$dropdown.find('.select2-results');
$resultsContainer.append($results);
};
Results.prototype.sort=function(data){
var sorter=this.options.get('sorter');
return sorter(data);
};
Results.prototype.highlightFirstItem=function(){
var $options=this.$results
.find('.select2-results__option[aria-selected]');
var $selected=$options.filter('[aria-selected=true]');
if($selected.length>0){
$selected.first().trigger('mouseenter');
}else{
$options.first().trigger('mouseenter');
}
this.ensureHighlightVisible();
};
Results.prototype.setClasses=function(){
var self=this;
this.data.current(function(selected){
var selectedIds=$.map(selected,function(s){
return s.id.toString();
});
var $options=self.$results
.find('.select2-results__option[aria-selected]');
$options.each(function(){
var $option=$(this);
var item=Utils.GetData(this,'data');
var id=''+item.id;
if((item.element!=null&&item.element.selected)||
(item.element==null&&$.inArray(id,selectedIds)>-1)){
$option.attr('aria-selected','true');
}else{
$option.attr('aria-selected','false');
}
});
});
};
Results.prototype.showLoading=function(params){
this.hideLoading();
var loadingMore=this.options.get('translations').get('searching');
var loading={
disabled:true,
loading:true,
text:loadingMore(params)
};
var $loading=this.option(loading);
$loading.className+=' loading-results';
this.$results.prepend($loading);
};
Results.prototype.hideLoading=function(){
this.$results.find('.loading-results').remove();
};
Results.prototype.option=function(data){
var option=document.createElement('li');
option.className='select2-results__option';
var attrs={
'role':'option',
'aria-selected':'false'
};
var matches=window.Element.prototype.matches||
window.Element.prototype.msMatchesSelector||
window.Element.prototype.webkitMatchesSelector;
if((data.element!=null&&matches.call(data.element,':disabled'))||
(data.element==null&&data.disabled)){
delete attrs['aria-selected'];
attrs['aria-disabled']='true';
}
if(data.id==null){
delete attrs['aria-selected'];
}
if(data._resultId!=null){
option.id=data._resultId;
}
if(data.title){
option.title=data.title;
}
if(data.children){
attrs.role='group';
attrs['aria-label']=data.text;
delete attrs['aria-selected'];
}
for(var attr in attrs){
var val=attrs[attr];
option.setAttribute(attr,val);
}
if(data.children){
var $option=$(option);
var label=document.createElement('strong');
label.className='select2-results__group';
var $label=$(label);
this.template(data,label);
var $children=[];
for(var c=0;c<data.children.length;c++){
var child=data.children[c];
var $child=this.option(child);
$children.push($child);
}
var $childrenContainer=$('<ul></ul>',{
'class':'select2-results__options select2-results__options--nested'
});
$childrenContainer.append($children);
$option.append(label);
$option.append($childrenContainer);
}else{
this.template(data,option);
}
Utils.StoreData(option,'data',data);
return option;
};
Results.prototype.bind=function(container,$container){
var self=this;
var id=container.id+'-results';
this.$results.attr('id',id);
container.on('results:all',function(params){
self.clear();
self.append(params.data);
if(container.isOpen()){
self.setClasses();
self.highlightFirstItem();
}
});
container.on('results:append',function(params){
self.append(params.data);
if(container.isOpen()){
self.setClasses();
}
});
container.on('query',function(params){
self.hideMessages();
self.showLoading(params);
});
container.on('select',function(){
if(!container.isOpen()){
return;
}
self.setClasses();
if(self.options.get('scrollAfterSelect')){
self.highlightFirstItem();
}
});
container.on('unselect',function(){
if(!container.isOpen()){
return;
}
self.setClasses();
if(self.options.get('scrollAfterSelect')){
self.highlightFirstItem();
}
});
container.on('open',function(){
self.$results.attr('aria-expanded','true');
self.$results.attr('aria-hidden','false');
self.setClasses();
self.ensureHighlightVisible();
});
container.on('close',function(){
self.$results.attr('aria-expanded','false');
self.$results.attr('aria-hidden','true');
self.$results.removeAttr('aria-activedescendant');
});
container.on('results:toggle',function(){
var $highlighted=self.getHighlightedResults();
if($highlighted.length===0){
return;
}
$highlighted.trigger('mouseup');
});
container.on('results:select',function(){
var $highlighted=self.getHighlightedResults();
if($highlighted.length===0){
return;
}
var data=Utils.GetData($highlighted[0],'data');
if($highlighted.attr('aria-selected')=='true'){
self.trigger('close',{});
}else{
self.trigger('select',{
data:data
});
}
});
container.on('results:previous',function(){
var $highlighted=self.getHighlightedResults();
var $options=self.$results.find('[aria-selected]');
var currentIndex=$options.index($highlighted);
if(currentIndex<=0){
return;
}
var nextIndex=currentIndex-1;
if($highlighted.length===0){
nextIndex=0;
}
var $next=$options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset=self.$results.offset().top;
var nextTop=$next.offset().top;
var nextOffset=self.$results.scrollTop()+(nextTop-currentOffset);
if(nextIndex===0){
self.$results.scrollTop(0);
}else if(nextTop-currentOffset<0){
self.$results.scrollTop(nextOffset);
}
});
container.on('results:next',function(){
var $highlighted=self.getHighlightedResults();
var $options=self.$results.find('[aria-selected]');
var currentIndex=$options.index($highlighted);
var nextIndex=currentIndex+1;
if(nextIndex>=$options.length){
return;
}
var $next=$options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset=self.$results.offset().top+
self.$results.outerHeight(false);
var nextBottom=$next.offset().top+$next.outerHeight(false);
var nextOffset=self.$results.scrollTop()+nextBottom-currentOffset;
if(nextIndex===0){
self.$results.scrollTop(0);
}else if(nextBottom>currentOffset){
self.$results.scrollTop(nextOffset);
}
});
container.on('results:focus',function(params){
params.element.addClass('select2-results__option--highlighted');
});
container.on('results:message',function(params){
self.displayMessage(params);
});
if($.fn.mousewheel){
this.$results.on('mousewheel',function(e){
var top=self.$results.scrollTop();
var bottom=self.$results.get(0).scrollHeight-top+e.deltaY;
var isAtTop=e.deltaY>0&&top-e.deltaY<=0;
var isAtBottom=e.deltaY<0&&bottom<=self.$results.height();
if(isAtTop){
self.$results.scrollTop(0);
e.preventDefault();
e.stopPropagation();
}else if(isAtBottom){
self.$results.scrollTop(
self.$results.get(0).scrollHeight-self.$results.height()
);
e.preventDefault();
e.stopPropagation();
}
});
}
this.$results.on('mouseup','.select2-results__option[aria-selected]',
function(evt){
var $this=$(this);
var data=Utils.GetData(this,'data');
if($this.attr('aria-selected')==='true'){
if(self.options.get('multiple')){
self.trigger('unselect',{
originalEvent:evt,
data:data
});
}else{
self.trigger('close',{});
}
return;
}
self.trigger('select',{
originalEvent:evt,
data:data
});
});
this.$results.on('mouseenter','.select2-results__option[aria-selected]',
function(evt){
var data=Utils.GetData(this,'data');
self.getHighlightedResults()
.removeClass('select2-results__option--highlighted');
self.trigger('results:focus',{
data:data,
element:$(this)
});
});
};
Results.prototype.getHighlightedResults=function(){
var $highlighted=this.$results
.find('.select2-results__option--highlighted');
return $highlighted;
};
Results.prototype.destroy=function(){
this.$results.remove();
};
Results.prototype.ensureHighlightVisible=function(){
var $highlighted=this.getHighlightedResults();
if($highlighted.length===0){
return;
}
var $options=this.$results.find('[aria-selected]');
var currentIndex=$options.index($highlighted);
var currentOffset=this.$results.offset().top;
var nextTop=$highlighted.offset().top;
var nextOffset=this.$results.scrollTop()+(nextTop-currentOffset);
var offsetDelta=nextTop-currentOffset;
nextOffset-=$highlighted.outerHeight(false)*2;
if(currentIndex<=2){
this.$results.scrollTop(0);
}else if(offsetDelta>this.$results.outerHeight()||offsetDelta<0){
this.$results.scrollTop(nextOffset);
}
};
Results.prototype.template=function(result,container){
var template=this.options.get('templateResult');
var escapeMarkup=this.options.get('escapeMarkup');
var content=template(result,container);
if(content==null){
container.style.display='none';
}else if(typeof content==='string'){
container.innerHTML=escapeMarkup(content);
}else{
$(container).append(content);
}
};
return Results;
});
S2.define('select2/keys',[
],function(){
var KEYS={
BACKSPACE:8,
TAB:9,
ENTER:13,
SHIFT:16,
CTRL:17,
ALT:18,
ESC:27,
SPACE:32,
PAGE_UP:33,
PAGE_DOWN:34,
END:35,
HOME:36,
LEFT:37,
UP:38,
RIGHT:39,
DOWN:40,
DELETE:46
};
return KEYS;
});
S2.define('select2/selection/base',[
'jquery',
'../utils',
'../keys'
],function($,Utils,KEYS){
function BaseSelection($element,options){
this.$element=$element;
this.options=options;
BaseSelection.__super__.constructor.call(this);
}
Utils.Extend(BaseSelection,Utils.Observable);
BaseSelection.prototype.render=function(){
var $selection=$(
'<span class="select2-selection" role="combobox" '+
' aria-haspopup="true" aria-expanded="false">'+
'</span>'
);
this._tabindex=0;
if(Utils.GetData(this.$element[0],'old-tabindex')!=null){
this._tabindex=Utils.GetData(this.$element[0],'old-tabindex');
}else if(this.$element.attr('tabindex')!=null){
this._tabindex=this.$element.attr('tabindex');
}
$selection.attr('title',this.$element.attr('title'));
$selection.attr('tabindex',this._tabindex);
$selection.attr('aria-disabled','false');
this.$selection=$selection;
return $selection;
};
BaseSelection.prototype.bind=function(container,$container){
var self=this;
var resultsId=container.id+'-results';
this.container=container;
this.$selection.on('focus',function(evt){
self.trigger('focus',evt);
});
this.$selection.on('blur',function(evt){
self._handleBlur(evt);
});
this.$selection.on('keydown',function(evt){
self.trigger('keypress',evt);
if(evt.which===KEYS.SPACE){
evt.preventDefault();
}
});
container.on('results:focus',function(params){
self.$selection.attr('aria-activedescendant',params.data._resultId);
});
container.on('selection:update',function(params){
self.update(params.data);
});
container.on('open',function(){
self.$selection.attr('aria-expanded','true');
self.$selection.attr('aria-owns',resultsId);
self._attachCloseHandler(container);
});
container.on('close',function(){
self.$selection.attr('aria-expanded','false');
self.$selection.removeAttr('aria-activedescendant');
self.$selection.removeAttr('aria-owns');
self.$selection.trigger('focus');
self._detachCloseHandler(container);
});
container.on('enable',function(){
self.$selection.attr('tabindex',self._tabindex);
self.$selection.attr('aria-disabled','false');
});
container.on('disable',function(){
self.$selection.attr('tabindex','-1');
self.$selection.attr('aria-disabled','true');
});
};
BaseSelection.prototype._handleBlur=function(evt){
var self=this;
window.setTimeout(function(){
if(
(document.activeElement==self.$selection[0])||
($.contains(self.$selection[0],document.activeElement))
){
return;
}
self.trigger('blur',evt);
},1);
};
BaseSelection.prototype._attachCloseHandler=function(container){
$(document.body).on('mousedown.select2.'+container.id,function(e){
var $target=$(e.target);
var $select=$target.closest('.select2');
var $all=$('.select2.select2-container--open');
$all.each(function(){
if(this==$select[0]){
return;
}
var $element=Utils.GetData(this,'element');
$element.select2('close');
});
});
};
BaseSelection.prototype._detachCloseHandler=function(container){
$(document.body).off('mousedown.select2.'+container.id);
};
BaseSelection.prototype.position=function($selection,$container){
var $selectionContainer=$container.find('.selection');
$selectionContainer.append($selection);
};
BaseSelection.prototype.destroy=function(){
this._detachCloseHandler(this.container);
};
BaseSelection.prototype.update=function(data){
throw new Error('The `update` method must be defined in child classes.');
};
BaseSelection.prototype.isEnabled=function(){
return!this.isDisabled();
};
BaseSelection.prototype.isDisabled=function(){
return this.options.get('disabled');
};
return BaseSelection;
});
S2.define('select2/selection/single',[
'jquery',
'./base',
'../utils',
'../keys'
],function($,BaseSelection,Utils,KEYS){
function SingleSelection(){
SingleSelection.__super__.constructor.apply(this,arguments);
}
Utils.Extend(SingleSelection,BaseSelection);
SingleSelection.prototype.render=function(){
var $selection=SingleSelection.__super__.render.call(this);
$selection.addClass('select2-selection--single');
$selection.html(
'<span class="select2-selection__rendered"></span>'+
'<span class="select2-selection__arrow" role="presentation">'+
'<b role="presentation"></b>'+
'</span>'
);
return $selection;
};
SingleSelection.prototype.bind=function(container,$container){
var self=this;
SingleSelection.__super__.bind.apply(this,arguments);
var id=container.id+'-container';
this.$selection.find('.select2-selection__rendered')
.attr('id',id)
.attr('role','textbox')
.attr('aria-readonly','true');
this.$selection.attr('aria-labelledby',id);
this.$selection.on('mousedown',function(evt){
if(evt.which!==1){
return;
}
self.trigger('toggle',{
originalEvent:evt
});
});
this.$selection.on('focus',function(evt){
});
this.$selection.on('blur',function(evt){
});
container.on('focus',function(evt){
if(!container.isOpen()){
self.$selection.trigger('focus');
}
});
};
SingleSelection.prototype.clear=function(){
var $rendered=this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
};
SingleSelection.prototype.display=function(data,container){
var template=this.options.get('templateSelection');
var escapeMarkup=this.options.get('escapeMarkup');
return escapeMarkup(template(data,container));
};
SingleSelection.prototype.selectionContainer=function(){
return $('<span></span>');
};
SingleSelection.prototype.update=function(data){
if(data.length===0){
this.clear();
return;
}
var selection=data[0];
var $rendered=this.$selection.find('.select2-selection__rendered');
var formatted=this.display(selection,$rendered);
$rendered.empty().append(formatted);
var title=selection.title||selection.text;
if(title){
$rendered.attr('title',title);
}else{
$rendered.removeAttr('title');
}
};
return SingleSelection;
});
S2.define('select2/selection/multiple',[
'jquery',
'./base',
'../utils'
],function($,BaseSelection,Utils){
function MultipleSelection($element,options){
MultipleSelection.__super__.constructor.apply(this,arguments);
}
Utils.Extend(MultipleSelection,BaseSelection);
MultipleSelection.prototype.render=function(){
var $selection=MultipleSelection.__super__.render.call(this);
$selection.addClass('select2-selection--multiple');
$selection.html(
'<ul class="select2-selection__rendered"></ul>'
);
return $selection;
};
MultipleSelection.prototype.bind=function(container,$container){
var self=this;
MultipleSelection.__super__.bind.apply(this,arguments);
this.$selection.on('click',function(evt){
self.trigger('toggle',{
originalEvent:evt
});
});
this.$selection.on(
'click',
'.select2-selection__choice__remove',
function(evt){
if(self.isDisabled()){
return;
}
var $remove=$(this);
var $selection=$remove.parent();
var data=Utils.GetData($selection[0],'data');
self.trigger('unselect',{
originalEvent:evt,
data:data
});
}
);
};
MultipleSelection.prototype.clear=function(){
var $rendered=this.$selection.find('.select2-selection__rendered');
$rendered.empty();
$rendered.removeAttr('title');
};
MultipleSelection.prototype.display=function(data,container){
var template=this.options.get('templateSelection');
var escapeMarkup=this.options.get('escapeMarkup');
return escapeMarkup(template(data,container));
};
MultipleSelection.prototype.selectionContainer=function(){
var $container=$(
'<li class="select2-selection__choice">'+
'<span class="select2-selection__choice__remove" role="presentation">'+
'×'+
'</span>'+
'</li>'
);
return $container;
};
MultipleSelection.prototype.update=function(data){
this.clear();
if(data.length===0){
return;
}
var $selections=[];
for(var d=0;d<data.length;d++){
var selection=data[d];
var $selection=this.selectionContainer();
var formatted=this.display(selection,$selection);
$selection.append(formatted);
var title=selection.title||selection.text;
if(title){
$selection.attr('title',title);
}
Utils.StoreData($selection[0],'data',selection);
$selections.push($selection);
}
var $rendered=this.$selection.find('.select2-selection__rendered');
Utils.appendMany($rendered,$selections);
};
return MultipleSelection;
});
S2.define('select2/selection/placeholder',[
'../utils'
],function(Utils){
function Placeholder(decorated,$element,options){
this.placeholder=this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this,$element,options);
}
Placeholder.prototype.normalizePlaceholder=function(_,placeholder){
if(typeof placeholder==='string'){
placeholder={
id:'',
text:placeholder
};
}
return placeholder;
};
Placeholder.prototype.createPlaceholder=function(decorated,placeholder){
var $placeholder=this.selectionContainer();
$placeholder.html(this.display(placeholder));
$placeholder.addClass('select2-selection__placeholder')
.removeClass('select2-selection__choice');
return $placeholder;
};
Placeholder.prototype.update=function(decorated,data){
var singlePlaceholder=(
data.length==1&&data[0].id!=this.placeholder.id
);
var multipleSelections=data.length>1;
if(multipleSelections||singlePlaceholder){
return decorated.call(this,data);
}
this.clear();
var $placeholder=this.createPlaceholder(this.placeholder);
this.$selection.find('.select2-selection__rendered').append($placeholder);
};
return Placeholder;
});
S2.define('select2/selection/allowClear',[
'jquery',
'../keys',
'../utils'
],function($,KEYS,Utils){
function AllowClear(){}
AllowClear.prototype.bind=function(decorated,container,$container){
var self=this;
decorated.call(this,container,$container);
if(this.placeholder==null){
if(this.options.get('debug')&&window.console&&console.error){
console.error(
'Select2: The `allowClear` option should be used in combination '+
'with the `placeholder` option.'
);
}
}
this.$selection.on('mousedown','.select2-selection__clear',
function(evt){
self._handleClear(evt);
});
container.on('keypress',function(evt){
self._handleKeyboardClear(evt,container);
});
};
AllowClear.prototype._handleClear=function(_,evt){
if(this.isDisabled()){
return;
}
var $clear=this.$selection.find('.select2-selection__clear');
if($clear.length===0){
return;
}
evt.stopPropagation();
var data=Utils.GetData($clear[0],'data');
var previousVal=this.$element.val();
this.$element.val(this.placeholder.id);
var unselectData={
data:data
};
this.trigger('clear',unselectData);
if(unselectData.prevented){
this.$element.val(previousVal);
return;
}
for(var d=0;d<data.length;d++){
unselectData={
data:data[d]
};
this.trigger('unselect',unselectData);
if(unselectData.prevented){
this.$element.val(previousVal);
return;
}
}
this.$element.trigger('input').trigger('change');
this.trigger('toggle',{});
};
AllowClear.prototype._handleKeyboardClear=function(_,evt,container){
if(container.isOpen()){
return;
}
if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){
this._handleClear(evt);
}
};
AllowClear.prototype.update=function(decorated,data){
decorated.call(this,data);
if(this.$selection.find('.select2-selection__placeholder').length>0||
data.length===0){
return;
}
var removeAll=this.options.get('translations').get('removeAllItems');
var $remove=$(
'<span class="select2-selection__clear" title="'+removeAll()+'">'+
'×'+
'</span>'
);
Utils.StoreData($remove[0],'data',data);
this.$selection.find('.select2-selection__rendered').prepend($remove);
};
return AllowClear;
});
S2.define('select2/selection/search',[
'jquery',
'../utils',
'../keys'
],function($,Utils,KEYS){
function Search(decorated,$element,options){
decorated.call(this,$element,options);
}
Search.prototype.render=function(decorated){
var $search=$(
'<li class="select2-search select2-search--inline">'+
'<input class="select2-search__field" type="search" tabindex="-1"'+
' autocomplete="off" autocorrect="off" autocapitalize="none"'+
' spellcheck="false" role="searchbox" aria-autocomplete="list" />'+
'</li>'
);
this.$searchContainer=$search;
this.$search=$search.find('input');
var $rendered=decorated.call(this);
this._transferTabIndex();
return $rendered;
};
Search.prototype.bind=function(decorated,container,$container){
var self=this;
var resultsId=container.id+'-results';
decorated.call(this,container,$container);
container.on('open',function(){
self.$search.attr('aria-controls',resultsId);
self.$search.trigger('focus');
});
container.on('close',function(){
self.$search.val('');
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.trigger('focus');
});
container.on('enable',function(){
self.$search.prop('disabled',false);
self._transferTabIndex();
});
container.on('disable',function(){
self.$search.prop('disabled',true);
});
container.on('focus',function(evt){
self.$search.trigger('focus');
});
container.on('results:focus',function(params){
if(params.data._resultId){
self.$search.attr('aria-activedescendant',params.data._resultId);
}else{
self.$search.removeAttr('aria-activedescendant');
}
});
this.$selection.on('focusin','.select2-search--inline',function(evt){
self.trigger('focus',evt);
});
this.$selection.on('focusout','.select2-search--inline',function(evt){
self._handleBlur(evt);
});
this.$selection.on('keydown','.select2-search--inline',function(evt){
evt.stopPropagation();
self.trigger('keypress',evt);
self._keyUpPrevented=evt.isDefaultPrevented();
var key=evt.which;
if(key===KEYS.BACKSPACE&&self.$search.val()===''){
var $previousChoice=self.$searchContainer
.prev('.select2-selection__choice');
if($previousChoice.length>0){
var item=Utils.GetData($previousChoice[0],'data');
self.searchRemoveChoice(item);
evt.preventDefault();
}
}
});
this.$selection.on('click','.select2-search--inline',function(evt){
if(self.$search.val()){
evt.stopPropagation();
}
});
var msie=document.documentMode;
var disableInputEvents=msie&&msie<=11;
this.$selection.on(
'input.searchcheck',
'.select2-search--inline',
function(evt){
if(disableInputEvents){
self.$selection.off('input.search input.searchcheck');
return;
}
self.$selection.off('keyup.search');
}
);
this.$selection.on(
'keyup.search input.search',
'.select2-search--inline',
function(evt){
if(disableInputEvents&&evt.type==='input'){
self.$selection.off('input.search input.searchcheck');
return;
}
var key=evt.which;
if(key==KEYS.SHIFT||key==KEYS.CTRL||key==KEYS.ALT){
return;
}
if(key==KEYS.TAB){
return;
}
self.handleSearch(evt);
}
);
};
Search.prototype._transferTabIndex=function(decorated){
this.$search.attr('tabindex',this.$selection.attr('tabindex'));
this.$selection.attr('tabindex','-1');
};
Search.prototype.createPlaceholder=function(decorated,placeholder){
this.$search.attr('placeholder',placeholder.text);
};
Search.prototype.update=function(decorated,data){
var searchHadFocus=this.$search[0]==document.activeElement;
this.$search.attr('placeholder','');
decorated.call(this,data);
this.$selection.find('.select2-selection__rendered')
.append(this.$searchContainer);
this.resizeSearch();
if(searchHadFocus){
this.$search.trigger('focus');
}
};
Search.prototype.handleSearch=function(){
this.resizeSearch();
if(!this._keyUpPrevented){
var input=this.$search.val();
this.trigger('query',{
term:input
});
}
this._keyUpPrevented=false;
};
Search.prototype.searchRemoveChoice=function(decorated,item){
this.trigger('unselect',{
data:item
});
this.$search.val(item.text);
this.handleSearch();
};
Search.prototype.resizeSearch=function(){
this.$search.css('width','25px');
var width='';
if(this.$search.attr('placeholder')!==''){
width=this.$selection.find('.select2-selection__rendered').width();
}else{
var minimumWidth=this.$search.val().length+1;
width=(minimumWidth*0.75)+'em';
}
this.$search.css('width',width);
};
return Search;
});
S2.define('select2/selection/eventRelay',[
'jquery'
],function($){
function EventRelay(){}
EventRelay.prototype.bind=function(decorated,container,$container){
var self=this;
var relayEvents=[
'open','opening',
'close','closing',
'select','selecting',
'unselect','unselecting',
'clear','clearing'
];
var preventableEvents=[
'opening','closing','selecting','unselecting','clearing'
];
decorated.call(this,container,$container);
container.on('*',function(name,params){
if($.inArray(name,relayEvents)===-1){
return;
}
params=params||{};
var evt=$.Event('select2:'+name,{
params:params
});
self.$element.trigger(evt);
if($.inArray(name,preventableEvents)===-1){
return;
}
params.prevented=evt.isDefaultPrevented();
});
};
return EventRelay;
});
S2.define('select2/translation',[
'jquery',
'require'
],function($,require){
function Translation(dict){
this.dict=dict||{};
}
Translation.prototype.all=function(){
return this.dict;
};
Translation.prototype.get=function(key){
return this.dict[key];
};
Translation.prototype.extend=function(translation){
this.dict=$.extend({},translation.all(),this.dict);
};
Translation._cache={};
Translation.loadPath=function(path){
if(!(path in Translation._cache)){
var translations=require(path);
Translation._cache[path]=translations;
}
return new Translation(Translation._cache[path]);
};
return Translation;
});
S2.define('select2/diacritics',[
],function(){
var diacritics={
'\u24B6':'A',
'\uFF21':'A',
'\u00C0':'A',
'\u00C1':'A',
'\u00C2':'A',
'\u1EA6':'A',
'\u1EA4':'A',
'\u1EAA':'A',
'\u1EA8':'A',
'\u00C3':'A',
'\u0100':'A',
'\u0102':'A',
'\u1EB0':'A',
'\u1EAE':'A',
'\u1EB4':'A',
'\u1EB2':'A',
'\u0226':'A',
'\u01E0':'A',
'\u00C4':'A',
'\u01DE':'A',
'\u1EA2':'A',
'\u00C5':'A',
'\u01FA':'A',
'\u01CD':'A',
'\u0200':'A',
'\u0202':'A',
'\u1EA0':'A',
'\u1EAC':'A',
'\u1EB6':'A',
'\u1E00':'A',
'\u0104':'A',
'\u023A':'A',
'\u2C6F':'A',
'\uA732':'AA',
'\u00C6':'AE',
'\u01FC':'AE',
'\u01E2':'AE',
'\uA734':'AO',
'\uA736':'AU',
'\uA738':'AV',
'\uA73A':'AV',
'\uA73C':'AY',
'\u24B7':'B',
'\uFF22':'B',
'\u1E02':'B',
'\u1E04':'B',
'\u1E06':'B',
'\u0243':'B',
'\u0182':'B',
'\u0181':'B',
'\u24B8':'C',
'\uFF23':'C',
'\u0106':'C',
'\u0108':'C',
'\u010A':'C',
'\u010C':'C',
'\u00C7':'C',
'\u1E08':'C',
'\u0187':'C',
'\u023B':'C',
'\uA73E':'C',
'\u24B9':'D',
'\uFF24':'D',
'\u1E0A':'D',
'\u010E':'D',
'\u1E0C':'D',
'\u1E10':'D',
'\u1E12':'D',
'\u1E0E':'D',
'\u0110':'D',
'\u018B':'D',
'\u018A':'D',
'\u0189':'D',
'\uA779':'D',
'\u01F1':'DZ',
'\u01C4':'DZ',
'\u01F2':'Dz',
'\u01C5':'Dz',
'\u24BA':'E',
'\uFF25':'E',
'\u00C8':'E',
'\u00C9':'E',
'\u00CA':'E',
'\u1EC0':'E',
'\u1EBE':'E',
'\u1EC4':'E',
'\u1EC2':'E',
'\u1EBC':'E',
'\u0112':'E',
'\u1E14':'E',
'\u1E16':'E',
'\u0114':'E',
'\u0116':'E',
'\u00CB':'E',
'\u1EBA':'E',
'\u011A':'E',
'\u0204':'E',
'\u0206':'E',
'\u1EB8':'E',
'\u1EC6':'E',
'\u0228':'E',
'\u1E1C':'E',
'\u0118':'E',
'\u1E18':'E',
'\u1E1A':'E',
'\u0190':'E',
'\u018E':'E',
'\u24BB':'F',
'\uFF26':'F',
'\u1E1E':'F',
'\u0191':'F',
'\uA77B':'F',
'\u24BC':'G',
'\uFF27':'G',
'\u01F4':'G',
'\u011C':'G',
'\u1E20':'G',
'\u011E':'G',
'\u0120':'G',
'\u01E6':'G',
'\u0122':'G',
'\u01E4':'G',
'\u0193':'G',
'\uA7A0':'G',
'\uA77D':'G',
'\uA77E':'G',
'\u24BD':'H',
'\uFF28':'H',
'\u0124':'H',
'\u1E22':'H',
'\u1E26':'H',
'\u021E':'H',
'\u1E24':'H',
'\u1E28':'H',
'\u1E2A':'H',
'\u0126':'H',
'\u2C67':'H',
'\u2C75':'H',
'\uA78D':'H',
'\u24BE':'I',
'\uFF29':'I',
'\u00CC':'I',
'\u00CD':'I',
'\u00CE':'I',
'\u0128':'I',
'\u012A':'I',
'\u012C':'I',
'\u0130':'I',
'\u00CF':'I',
'\u1E2E':'I',
'\u1EC8':'I',
'\u01CF':'I',
'\u0208':'I',
'\u020A':'I',
'\u1ECA':'I',
'\u012E':'I',
'\u1E2C':'I',
'\u0197':'I',
'\u24BF':'J',
'\uFF2A':'J',
'\u0134':'J',
'\u0248':'J',
'\u24C0':'K',
'\uFF2B':'K',
'\u1E30':'K',
'\u01E8':'K',
'\u1E32':'K',
'\u0136':'K',
'\u1E34':'K',
'\u0198':'K',
'\u2C69':'K',
'\uA740':'K',
'\uA742':'K',
'\uA744':'K',
'\uA7A2':'K',
'\u24C1':'L',
'\uFF2C':'L',
'\u013F':'L',
'\u0139':'L',
'\u013D':'L',
'\u1E36':'L',
'\u1E38':'L',
'\u013B':'L',
'\u1E3C':'L',
'\u1E3A':'L',
'\u0141':'L',
'\u023D':'L',
'\u2C62':'L',
'\u2C60':'L',
'\uA748':'L',
'\uA746':'L',
'\uA780':'L',
'\u01C7':'LJ',
'\u01C8':'Lj',
'\u24C2':'M',
'\uFF2D':'M',
'\u1E3E':'M',
'\u1E40':'M',
'\u1E42':'M',
'\u2C6E':'M',
'\u019C':'M',
'\u24C3':'N',
'\uFF2E':'N',
'\u01F8':'N',
'\u0143':'N',
'\u00D1':'N',
'\u1E44':'N',
'\u0147':'N',
'\u1E46':'N',
'\u0145':'N',
'\u1E4A':'N',
'\u1E48':'N',
'\u0220':'N',
'\u019D':'N',
'\uA790':'N',
'\uA7A4':'N',
'\u01CA':'NJ',
'\u01CB':'Nj',
'\u24C4':'O',
'\uFF2F':'O',
'\u00D2':'O',
'\u00D3':'O',
'\u00D4':'O',
'\u1ED2':'O',
'\u1ED0':'O',
'\u1ED6':'O',
'\u1ED4':'O',
'\u00D5':'O',
'\u1E4C':'O',
'\u022C':'O',
'\u1E4E':'O',
'\u014C':'O',
'\u1E50':'O',
'\u1E52':'O',
'\u014E':'O',
'\u022E':'O',
'\u0230':'O',
'\u00D6':'O',
'\u022A':'O',
'\u1ECE':'O',
'\u0150':'O',
'\u01D1':'O',
'\u020C':'O',
'\u020E':'O',
'\u01A0':'O',
'\u1EDC':'O',
'\u1EDA':'O',
'\u1EE0':'O',
'\u1EDE':'O',
'\u1EE2':'O',
'\u1ECC':'O',
'\u1ED8':'O',
'\u01EA':'O',
'\u01EC':'O',
'\u00D8':'O',
'\u01FE':'O',
'\u0186':'O',
'\u019F':'O',
'\uA74A':'O',
'\uA74C':'O',
'\u0152':'OE',
'\u01A2':'OI',
'\uA74E':'OO',
'\u0222':'OU',
'\u24C5':'P',
'\uFF30':'P',
'\u1E54':'P',
'\u1E56':'P',
'\u01A4':'P',
'\u2C63':'P',
'\uA750':'P',
'\uA752':'P',
'\uA754':'P',
'\u24C6':'Q',
'\uFF31':'Q',
'\uA756':'Q',
'\uA758':'Q',
'\u024A':'Q',
'\u24C7':'R',
'\uFF32':'R',
'\u0154':'R',
'\u1E58':'R',
'\u0158':'R',
'\u0210':'R',
'\u0212':'R',
'\u1E5A':'R',
'\u1E5C':'R',
'\u0156':'R',
'\u1E5E':'R',
'\u024C':'R',
'\u2C64':'R',
'\uA75A':'R',
'\uA7A6':'R',
'\uA782':'R',
'\u24C8':'S',
'\uFF33':'S',
'\u1E9E':'S',
'\u015A':'S',
'\u1E64':'S',
'\u015C':'S',
'\u1E60':'S',
'\u0160':'S',
'\u1E66':'S',
'\u1E62':'S',
'\u1E68':'S',
'\u0218':'S',
'\u015E':'S',
'\u2C7E':'S',
'\uA7A8':'S',
'\uA784':'S',
'\u24C9':'T',
'\uFF34':'T',
'\u1E6A':'T',
'\u0164':'T',
'\u1E6C':'T',
'\u021A':'T',
'\u0162':'T',
'\u1E70':'T',
'\u1E6E':'T',
'\u0166':'T',
'\u01AC':'T',
'\u01AE':'T',
'\u023E':'T',
'\uA786':'T',
'\uA728':'TZ',
'\u24CA':'U',
'\uFF35':'U',
'\u00D9':'U',
'\u00DA':'U',
'\u00DB':'U',
'\u0168':'U',
'\u1E78':'U',
'\u016A':'U',
'\u1E7A':'U',
'\u016C':'U',
'\u00DC':'U',
'\u01DB':'U',
'\u01D7':'U',
'\u01D5':'U',
'\u01D9':'U',
'\u1EE6':'U',
'\u016E':'U',
'\u0170':'U',
'\u01D3':'U',
'\u0214':'U',
'\u0216':'U',
'\u01AF':'U',
'\u1EEA':'U',
'\u1EE8':'U',
'\u1EEE':'U',
'\u1EEC':'U',
'\u1EF0':'U',
'\u1EE4':'U',
'\u1E72':'U',
'\u0172':'U',
'\u1E76':'U',
'\u1E74':'U',
'\u0244':'U',
'\u24CB':'V',
'\uFF36':'V',
'\u1E7C':'V',
'\u1E7E':'V',
'\u01B2':'V',
'\uA75E':'V',
'\u0245':'V',
'\uA760':'VY',
'\u24CC':'W',
'\uFF37':'W',
'\u1E80':'W',
'\u1E82':'W',
'\u0174':'W',
'\u1E86':'W',
'\u1E84':'W',
'\u1E88':'W',
'\u2C72':'W',
'\u24CD':'X',
'\uFF38':'X',
'\u1E8A':'X',
'\u1E8C':'X',
'\u24CE':'Y',
'\uFF39':'Y',
'\u1EF2':'Y',
'\u00DD':'Y',
'\u0176':'Y',
'\u1EF8':'Y',
'\u0232':'Y',
'\u1E8E':'Y',
'\u0178':'Y',
'\u1EF6':'Y',
'\u1EF4':'Y',
'\u01B3':'Y',
'\u024E':'Y',
'\u1EFE':'Y',
'\u24CF':'Z',
'\uFF3A':'Z',
'\u0179':'Z',
'\u1E90':'Z',
'\u017B':'Z',
'\u017D':'Z',
'\u1E92':'Z',
'\u1E94':'Z',
'\u01B5':'Z',
'\u0224':'Z',
'\u2C7F':'Z',
'\u2C6B':'Z',
'\uA762':'Z',
'\u24D0':'a',
'\uFF41':'a',
'\u1E9A':'a',
'\u00E0':'a',
'\u00E1':'a',
'\u00E2':'a',
'\u1EA7':'a',
'\u1EA5':'a',
'\u1EAB':'a',
'\u1EA9':'a',
'\u00E3':'a',
'\u0101':'a',
'\u0103':'a',
'\u1EB1':'a',
'\u1EAF':'a',
'\u1EB5':'a',
'\u1EB3':'a',
'\u0227':'a',
'\u01E1':'a',
'\u00E4':'a',
'\u01DF':'a',
'\u1EA3':'a',
'\u00E5':'a',
'\u01FB':'a',
'\u01CE':'a',
'\u0201':'a',
'\u0203':'a',
'\u1EA1':'a',
'\u1EAD':'a',
'\u1EB7':'a',
'\u1E01':'a',
'\u0105':'a',
'\u2C65':'a',
'\u0250':'a',
'\uA733':'aa',
'\u00E6':'ae',
'\u01FD':'ae',
'\u01E3':'ae',
'\uA735':'ao',
'\uA737':'au',
'\uA739':'av',
'\uA73B':'av',
'\uA73D':'ay',
'\u24D1':'b',
'\uFF42':'b',
'\u1E03':'b',
'\u1E05':'b',
'\u1E07':'b',
'\u0180':'b',
'\u0183':'b',
'\u0253':'b',
'\u24D2':'c',
'\uFF43':'c',
'\u0107':'c',
'\u0109':'c',
'\u010B':'c',
'\u010D':'c',
'\u00E7':'c',
'\u1E09':'c',
'\u0188':'c',
'\u023C':'c',
'\uA73F':'c',
'\u2184':'c',
'\u24D3':'d',
'\uFF44':'d',
'\u1E0B':'d',
'\u010F':'d',
'\u1E0D':'d',
'\u1E11':'d',
'\u1E13':'d',
'\u1E0F':'d',
'\u0111':'d',
'\u018C':'d',
'\u0256':'d',
'\u0257':'d',
'\uA77A':'d',
'\u01F3':'dz',
'\u01C6':'dz',
'\u24D4':'e',
'\uFF45':'e',
'\u00E8':'e',
'\u00E9':'e',
'\u00EA':'e',
'\u1EC1':'e',
'\u1EBF':'e',
'\u1EC5':'e',
'\u1EC3':'e',
'\u1EBD':'e',
'\u0113':'e',
'\u1E15':'e',
'\u1E17':'e',
'\u0115':'e',
'\u0117':'e',
'\u00EB':'e',
'\u1EBB':'e',
'\u011B':'e',
'\u0205':'e',
'\u0207':'e',
'\u1EB9':'e',
'\u1EC7':'e',
'\u0229':'e',
'\u1E1D':'e',
'\u0119':'e',
'\u1E19':'e',
'\u1E1B':'e',
'\u0247':'e',
'\u025B':'e',
'\u01DD':'e',
'\u24D5':'f',
'\uFF46':'f',
'\u1E1F':'f',
'\u0192':'f',
'\uA77C':'f',
'\u24D6':'g',
'\uFF47':'g',
'\u01F5':'g',
'\u011D':'g',
'\u1E21':'g',
'\u011F':'g',
'\u0121':'g',
'\u01E7':'g',
'\u0123':'g',
'\u01E5':'g',
'\u0260':'g',
'\uA7A1':'g',
'\u1D79':'g',
'\uA77F':'g',
'\u24D7':'h',
'\uFF48':'h',
'\u0125':'h',
'\u1E23':'h',
'\u1E27':'h',
'\u021F':'h',
'\u1E25':'h',
'\u1E29':'h',
'\u1E2B':'h',
'\u1E96':'h',
'\u0127':'h',
'\u2C68':'h',
'\u2C76':'h',
'\u0265':'h',
'\u0195':'hv',
'\u24D8':'i',
'\uFF49':'i',
'\u00EC':'i',
'\u00ED':'i',
'\u00EE':'i',
'\u0129':'i',
'\u012B':'i',
'\u012D':'i',
'\u00EF':'i',
'\u1E2F':'i',
'\u1EC9':'i',
'\u01D0':'i',
'\u0209':'i',
'\u020B':'i',
'\u1ECB':'i',
'\u012F':'i',
'\u1E2D':'i',
'\u0268':'i',
'\u0131':'i',
'\u24D9':'j',
'\uFF4A':'j',
'\u0135':'j',
'\u01F0':'j',
'\u0249':'j',
'\u24DA':'k',
'\uFF4B':'k',
'\u1E31':'k',
'\u01E9':'k',
'\u1E33':'k',
'\u0137':'k',
'\u1E35':'k',
'\u0199':'k',
'\u2C6A':'k',
'\uA741':'k',
'\uA743':'k',
'\uA745':'k',
'\uA7A3':'k',
'\u24DB':'l',
'\uFF4C':'l',
'\u0140':'l',
'\u013A':'l',
'\u013E':'l',
'\u1E37':'l',
'\u1E39':'l',
'\u013C':'l',
'\u1E3D':'l',
'\u1E3B':'l',
'\u017F':'l',
'\u0142':'l',
'\u019A':'l',
'\u026B':'l',
'\u2C61':'l',
'\uA749':'l',
'\uA781':'l',
'\uA747':'l',
'\u01C9':'lj',
'\u24DC':'m',
'\uFF4D':'m',
'\u1E3F':'m',
'\u1E41':'m',
'\u1E43':'m',
'\u0271':'m',
'\u026F':'m',
'\u24DD':'n',
'\uFF4E':'n',
'\u01F9':'n',
'\u0144':'n',
'\u00F1':'n',
'\u1E45':'n',
'\u0148':'n',
'\u1E47':'n',
'\u0146':'n',
'\u1E4B':'n',
'\u1E49':'n',
'\u019E':'n',
'\u0272':'n',
'\u0149':'n',
'\uA791':'n',
'\uA7A5':'n',
'\u01CC':'nj',
'\u24DE':'o',
'\uFF4F':'o',
'\u00F2':'o',
'\u00F3':'o',
'\u00F4':'o',
'\u1ED3':'o',
'\u1ED1':'o',
'\u1ED7':'o',
'\u1ED5':'o',
'\u00F5':'o',
'\u1E4D':'o',
'\u022D':'o',
'\u1E4F':'o',
'\u014D':'o',
'\u1E51':'o',
'\u1E53':'o',
'\u014F':'o',
'\u022F':'o',
'\u0231':'o',
'\u00F6':'o',
'\u022B':'o',
'\u1ECF':'o',
'\u0151':'o',
'\u01D2':'o',
'\u020D':'o',
'\u020F':'o',
'\u01A1':'o',
'\u1EDD':'o',
'\u1EDB':'o',
'\u1EE1':'o',
'\u1EDF':'o',
'\u1EE3':'o',
'\u1ECD':'o',
'\u1ED9':'o',
'\u01EB':'o',
'\u01ED':'o',
'\u00F8':'o',
'\u01FF':'o',
'\u0254':'o',
'\uA74B':'o',
'\uA74D':'o',
'\u0275':'o',
'\u0153':'oe',
'\u01A3':'oi',
'\u0223':'ou',
'\uA74F':'oo',
'\u24DF':'p',
'\uFF50':'p',
'\u1E55':'p',
'\u1E57':'p',
'\u01A5':'p',
'\u1D7D':'p',
'\uA751':'p',
'\uA753':'p',
'\uA755':'p',
'\u24E0':'q',
'\uFF51':'q',
'\u024B':'q',
'\uA757':'q',
'\uA759':'q',
'\u24E1':'r',
'\uFF52':'r',
'\u0155':'r',
'\u1E59':'r',
'\u0159':'r',
'\u0211':'r',
'\u0213':'r',
'\u1E5B':'r',
'\u1E5D':'r',
'\u0157':'r',
'\u1E5F':'r',
'\u024D':'r',
'\u027D':'r',
'\uA75B':'r',
'\uA7A7':'r',
'\uA783':'r',
'\u24E2':'s',
'\uFF53':'s',
'\u00DF':'s',
'\u015B':'s',
'\u1E65':'s',
'\u015D':'s',
'\u1E61':'s',
'\u0161':'s',
'\u1E67':'s',
'\u1E63':'s',
'\u1E69':'s',
'\u0219':'s',
'\u015F':'s',
'\u023F':'s',
'\uA7A9':'s',
'\uA785':'s',
'\u1E9B':'s',
'\u24E3':'t',
'\uFF54':'t',
'\u1E6B':'t',
'\u1E97':'t',
'\u0165':'t',
'\u1E6D':'t',
'\u021B':'t',
'\u0163':'t',
'\u1E71':'t',
'\u1E6F':'t',
'\u0167':'t',
'\u01AD':'t',
'\u0288':'t',
'\u2C66':'t',
'\uA787':'t',
'\uA729':'tz',
'\u24E4':'u',
'\uFF55':'u',
'\u00F9':'u',
'\u00FA':'u',
'\u00FB':'u',
'\u0169':'u',
'\u1E79':'u',
'\u016B':'u',
'\u1E7B':'u',
'\u016D':'u',
'\u00FC':'u',
'\u01DC':'u',
'\u01D8':'u',
'\u01D6':'u',
'\u01DA':'u',
'\u1EE7':'u',
'\u016F':'u',
'\u0171':'u',
'\u01D4':'u',
'\u0215':'u',
'\u0217':'u',
'\u01B0':'u',
'\u1EEB':'u',
'\u1EE9':'u',
'\u1EEF':'u',
'\u1EED':'u',
'\u1EF1':'u',
'\u1EE5':'u',
'\u1E73':'u',
'\u0173':'u',
'\u1E77':'u',
'\u1E75':'u',
'\u0289':'u',
'\u24E5':'v',
'\uFF56':'v',
'\u1E7D':'v',
'\u1E7F':'v',
'\u028B':'v',
'\uA75F':'v',
'\u028C':'v',
'\uA761':'vy',
'\u24E6':'w',
'\uFF57':'w',
'\u1E81':'w',
'\u1E83':'w',
'\u0175':'w',
'\u1E87':'w',
'\u1E85':'w',
'\u1E98':'w',
'\u1E89':'w',
'\u2C73':'w',
'\u24E7':'x',
'\uFF58':'x',
'\u1E8B':'x',
'\u1E8D':'x',
'\u24E8':'y',
'\uFF59':'y',
'\u1EF3':'y',
'\u00FD':'y',
'\u0177':'y',
'\u1EF9':'y',
'\u0233':'y',
'\u1E8F':'y',
'\u00FF':'y',
'\u1EF7':'y',
'\u1E99':'y',
'\u1EF5':'y',
'\u01B4':'y',
'\u024F':'y',
'\u1EFF':'y',
'\u24E9':'z',
'\uFF5A':'z',
'\u017A':'z',
'\u1E91':'z',
'\u017C':'z',
'\u017E':'z',
'\u1E93':'z',
'\u1E95':'z',
'\u01B6':'z',
'\u0225':'z',
'\u0240':'z',
'\u2C6C':'z',
'\uA763':'z',
'\u0386':'\u0391',
'\u0388':'\u0395',
'\u0389':'\u0397',
'\u038A':'\u0399',
'\u03AA':'\u0399',
'\u038C':'\u039F',
'\u038E':'\u03A5',
'\u03AB':'\u03A5',
'\u038F':'\u03A9',
'\u03AC':'\u03B1',
'\u03AD':'\u03B5',
'\u03AE':'\u03B7',
'\u03AF':'\u03B9',
'\u03CA':'\u03B9',
'\u0390':'\u03B9',
'\u03CC':'\u03BF',
'\u03CD':'\u03C5',
'\u03CB':'\u03C5',
'\u03B0':'\u03C5',
'\u03CE':'\u03C9',
'\u03C2':'\u03C3',
'\u2019':'\''
};
return diacritics;
});
S2.define('select2/data/base',[
'../utils'
],function(Utils){
function BaseAdapter($element,options){
BaseAdapter.__super__.constructor.call(this);
}
Utils.Extend(BaseAdapter,Utils.Observable);
BaseAdapter.prototype.current=function(callback){
throw new Error('The `current` method must be defined in child classes.');
};
BaseAdapter.prototype.query=function(params,callback){
throw new Error('The `query` method must be defined in child classes.');
};
BaseAdapter.prototype.bind=function(container,$container){
};
BaseAdapter.prototype.destroy=function(){
};
BaseAdapter.prototype.generateResultId=function(container,data){
var id=container.id+'-result-';
id+=Utils.generateChars(4);
if(data.id!=null){
id+='-'+data.id.toString();
}else{
id+='-'+Utils.generateChars(4);
}
return id;
};
return BaseAdapter;
});
S2.define('select2/data/select',[
'./base',
'../utils',
'jquery'
],function(BaseAdapter,Utils,$){
function SelectAdapter($element,options){
this.$element=$element;
this.options=options;
SelectAdapter.__super__.constructor.call(this);
}
Utils.Extend(SelectAdapter,BaseAdapter);
SelectAdapter.prototype.current=function(callback){
var data=[];
var self=this;
this.$element.find(':selected').each(function(){
var $option=$(this);
var option=self.item($option);
data.push(option);
});
callback(data);
};
SelectAdapter.prototype.select=function(data){
var self=this;
data.selected=true;
if($(data.element).is('option')){
data.element.selected=true;
this.$element.trigger('input').trigger('change');
return;
}
if(this.$element.prop('multiple')){
this.current(function(currentData){
var val=[];
data=[data];
data.push.apply(data,currentData);
for(var d=0;d<data.length;d++){
var id=data[d].id;
if($.inArray(id,val)===-1){
val.push(id);
}
}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
});
}else{
var val=data.id;
this.$element.val(val);
this.$element.trigger('input').trigger('change');
}
};
SelectAdapter.prototype.unselect=function(data){
var self=this;
if(!this.$element.prop('multiple')){
return;
}
data.selected=false;
if($(data.element).is('option')){
data.element.selected=false;
this.$element.trigger('input').trigger('change');
return;
}
this.current(function(currentData){
var val=[];
for(var d=0;d<currentData.length;d++){
var id=currentData[d].id;
if(id!==data.id&&$.inArray(id,val)===-1){
val.push(id);
}
}
self.$element.val(val);
self.$element.trigger('input').trigger('change');
});
};
SelectAdapter.prototype.bind=function(container,$container){
var self=this;
this.container=container;
container.on('select',function(params){
self.select(params.data);
});
container.on('unselect',function(params){
self.unselect(params.data);
});
};
SelectAdapter.prototype.destroy=function(){
this.$element.find('*').each(function(){
Utils.RemoveData(this);
});
};
SelectAdapter.prototype.query=function(params,callback){
var data=[];
var self=this;
var $options=this.$element.children();
$options.each(function(){
var $option=$(this);
if(!$option.is('option')&&!$option.is('optgroup')){
return;
}
var option=self.item($option);
var matches=self.matches(params,option);
if(matches!==null){
data.push(matches);
}
});
callback({
results:data
});
};
SelectAdapter.prototype.addOptions=function($options){
Utils.appendMany(this.$element,$options);
};
SelectAdapter.prototype.option=function(data){
var option;
if(data.children){
option=document.createElement('optgroup');
option.label=data.text;
}else{
option=document.createElement('option');
if(option.textContent!==undefined){
option.textContent=data.text;
}else{
option.innerText=data.text;
}
}
if(data.id!==undefined){
option.value=data.id;
}
if(data.disabled){
option.disabled=true;
}
if(data.selected){
option.selected=true;
}
if(data.title){
option.title=data.title;
}
var $option=$(option);
var normalizedData=this._normalizeItem(data);
normalizedData.element=option;
Utils.StoreData(option,'data',normalizedData);
return $option;
};
SelectAdapter.prototype.item=function($option){
var data={};
data=Utils.GetData($option[0],'data');
if(data!=null){
return data;
}
if($option.is('option')){
data={
id:$option.val(),
text:$option.text(),
disabled:$option.prop('disabled'),
selected:$option.prop('selected'),
title:$option.prop('title')
};
}else if($option.is('optgroup')){
data={
text:$option.prop('label'),
children:[],
title:$option.prop('title')
};
var $children=$option.children('option');
var children=[];
for(var c=0;c<$children.length;c++){
var $child=$($children[c]);
var child=this.item($child);
children.push(child);
}
data.children=children;
}
data=this._normalizeItem(data);
data.element=$option[0];
Utils.StoreData($option[0],'data',data);
return data;
};
SelectAdapter.prototype._normalizeItem=function(item){
if(item!==Object(item)){
item={
id:item,
text:item
};
}
item=$.extend({},{
text:''
},item);
var defaults={
selected:false,
disabled:false
};
if(item.id!=null){
item.id=item.id.toString();
}
if(item.text!=null){
item.text=item.text.toString();
}
if(item._resultId==null&&item.id&&this.container!=null){
item._resultId=this.generateResultId(this.container,item);
}
return $.extend({},defaults,item);
};
SelectAdapter.prototype.matches=function(params,data){
var matcher=this.options.get('matcher');
return matcher(params,data);
};
return SelectAdapter;
});
S2.define('select2/data/array',[
'./select',
'../utils',
'jquery'
],function(SelectAdapter,Utils,$){
function ArrayAdapter($element,options){
this._dataToConvert=options.get('data')||[];
ArrayAdapter.__super__.constructor.call(this,$element,options);
}
Utils.Extend(ArrayAdapter,SelectAdapter);
ArrayAdapter.prototype.bind=function(container,$container){
ArrayAdapter.__super__.bind.call(this,container,$container);
this.addOptions(this.convertToOptions(this._dataToConvert));
};
ArrayAdapter.prototype.select=function(data){
var $option=this.$element.find('option').filter(function(i,elm){
return elm.value==data.id.toString();
});
if($option.length===0){
$option=this.option(data);
this.addOptions($option);
}
ArrayAdapter.__super__.select.call(this,data);
};
ArrayAdapter.prototype.convertToOptions=function(data){
var self=this;
var $existing=this.$element.find('option');
var existingIds=$existing.map(function(){
return self.item($(this)).id;
}).get();
var $options=[];
function onlyItem(item){
return function(){
return $(this).val()==item.id;
};
}
for(var d=0;d<data.length;d++){
var item=this._normalizeItem(data[d]);
if($.inArray(item.id,existingIds)>=0){
var $existingOption=$existing.filter(onlyItem(item));
var existingData=this.item($existingOption);
var newData=$.extend(true,{},item,existingData);
var $newOption=this.option(newData);
$existingOption.replaceWith($newOption);
continue;
}
var $option=this.option(item);
if(item.children){
var $children=this.convertToOptions(item.children);
Utils.appendMany($option,$children);
}
$options.push($option);
}
return $options;
};
return ArrayAdapter;
});
S2.define('select2/data/ajax',[
'./array',
'../utils',
'jquery'
],function(ArrayAdapter,Utils,$){
function AjaxAdapter($element,options){
this.ajaxOptions=this._applyDefaults(options.get('ajax'));
if(this.ajaxOptions.processResults!=null){
this.processResults=this.ajaxOptions.processResults;
}
AjaxAdapter.__super__.constructor.call(this,$element,options);
}
Utils.Extend(AjaxAdapter,ArrayAdapter);
AjaxAdapter.prototype._applyDefaults=function(options){
var defaults={
data:function(params){
return $.extend({},params,{
q:params.term
});
},
transport:function(params,success,failure){
var $request=$.ajax(params);
$request.then(success);
$request.fail(failure);
return $request;
}
};
return $.extend({},defaults,options,true);
};
AjaxAdapter.prototype.processResults=function(results){
return results;
};
AjaxAdapter.prototype.query=function(params,callback){
var matches=[];
var self=this;
if(this._request!=null){
if($.isFunction(this._request.abort)){
this._request.abort();
}
this._request=null;
}
var options=$.extend({
type:'GET'
},this.ajaxOptions);
if(typeof options.url==='function'){
options.url=options.url.call(this.$element,params);
}
if(typeof options.data==='function'){
options.data=options.data.call(this.$element,params);
}
function request(){
var $request=options.transport(options,function(data){
var results=self.processResults(data,params);
if(self.options.get('debug')&&window.console&&console.error){
if(!results||!results.results||!$.isArray(results.results)){
console.error(
'Select2: The AJAX results did not return an array in the '+
'`results` key of the response.'
);
}
}
callback(results);
},function(){
if('status'in $request&&
($request.status===0||$request.status==='0')){
return;
}
self.trigger('results:message',{
message:'errorLoading'
});
});
self._request=$request;
}
if(this.ajaxOptions.delay&¶ms.term!=null){
if(this._queryTimeout){
window.clearTimeout(this._queryTimeout);
}
this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay);
}else{
request();
}
};
return AjaxAdapter;
});
S2.define('select2/data/tags',[
'jquery'
],function($){
function Tags(decorated,$element,options){
var tags=options.get('tags');
var createTag=options.get('createTag');
if(createTag!==undefined){
this.createTag=createTag;
}
var insertTag=options.get('insertTag');
if(insertTag!==undefined){
this.insertTag=insertTag;
}
decorated.call(this,$element,options);
if($.isArray(tags)){
for(var t=0;t<tags.length;t++){
var tag=tags[t];
var item=this._normalizeItem(tag);
var $option=this.option(item);
this.$element.append($option);
}
}
}
Tags.prototype.query=function(decorated,params,callback){
var self=this;
this._removeOldTags();
if(params.term==null||params.page!=null){
decorated.call(this,params,callback);
return;
}
function wrapper(obj,child){
var data=obj.results;
for(var i=0;i<data.length;i++){
var option=data[i];
var checkChildren=(
option.children!=null&&
!wrapper({
results:option.children
},true)
);
var optionText=(option.text||'').toUpperCase();
var paramsTerm=(params.term||'').toUpperCase();
var checkText=optionText===paramsTerm;
if(checkText||checkChildren){
if(child){
return false;
}
obj.data=data;
callback(obj);
return;
}
}
if(child){
return true;
}
var tag=self.createTag(params);
if(tag!=null){
var $option=self.option(tag);
$option.attr('data-select2-tag',true);
self.addOptions([$option]);
self.insertTag(data,tag);
}
obj.results=data;
callback(obj);
}
decorated.call(this,params,wrapper);
};
Tags.prototype.createTag=function(decorated,params){
var term=$.trim(params.term);
if(term===''){
return null;
}
return{
id:term,
text:term
};
};
Tags.prototype.insertTag=function(_,data,tag){
data.unshift(tag);
};
Tags.prototype._removeOldTags=function(_){
var $options=this.$element.find('option[data-select2-tag]');
$options.each(function(){
if(this.selected){
return;
}
$(this).remove();
});
};
return Tags;
});
S2.define('select2/data/tokenizer',[
'jquery'
],function($){
function Tokenizer(decorated,$element,options){
var tokenizer=options.get('tokenizer');
if(tokenizer!==undefined){
this.tokenizer=tokenizer;
}
decorated.call(this,$element,options);
}
Tokenizer.prototype.bind=function(decorated,container,$container){
decorated.call(this,container,$container);
this.$search=container.dropdown.$search||container.selection.$search||
$container.find('.select2-search__field');
};
Tokenizer.prototype.query=function(decorated,params,callback){
var self=this;
function createAndSelect(data){
var item=self._normalizeItem(data);
var $existingOptions=self.$element.find('option').filter(function(){
return $(this).val()===item.id;
});
if(!$existingOptions.length){
var $option=self.option(item);
$option.attr('data-select2-tag',true);
self._removeOldTags();
self.addOptions([$option]);
}
select(item);
}
function select(data){
self.trigger('select',{
data:data
});
}
params.term=params.term||'';
var tokenData=this.tokenizer(params,this.options,createAndSelect);
if(tokenData.term!==params.term){
if(this.$search.length){
this.$search.val(tokenData.term);
this.$search.trigger('focus');
}
params.term=tokenData.term;
}
decorated.call(this,params,callback);
};
Tokenizer.prototype.tokenizer=function(_,params,options,callback){
var separators=options.get('tokenSeparators')||[];
var term=params.term;
var i=0;
var createTag=this.createTag||function(params){
return{
id:params.term,
text:params.term
};
};
while(i<term.length){
var termChar=term[i];
if($.inArray(termChar,separators)===-1){
i++;
continue;
}
var part=term.substr(0,i);
var partParams=$.extend({},params,{
term:part
});
var data=createTag(partParams);
if(data==null){
i++;
continue;
}
callback(data);
term=term.substr(i+1)||'';
i=0;
}
return{
term:term
};
};
return Tokenizer;
});
S2.define('select2/data/minimumInputLength',[
],function(){
function MinimumInputLength(decorated,$e,options){
this.minimumInputLength=options.get('minimumInputLength');
decorated.call(this,$e,options);
}
MinimumInputLength.prototype.query=function(decorated,params,callback){
params.term=params.term||'';
if(params.term.length<this.minimumInputLength){
this.trigger('results:message',{
message:'inputTooShort',
args:{
minimum:this.minimumInputLength,
input:params.term,
params:params
}
});
return;
}
decorated.call(this,params,callback);
};
return MinimumInputLength;
});
S2.define('select2/data/maximumInputLength',[
],function(){
function MaximumInputLength(decorated,$e,options){
this.maximumInputLength=options.get('maximumInputLength');
decorated.call(this,$e,options);
}
MaximumInputLength.prototype.query=function(decorated,params,callback){
params.term=params.term||'';
if(this.maximumInputLength>0&&
params.term.length>this.maximumInputLength){
this.trigger('results:message',{
message:'inputTooLong',
args:{
maximum:this.maximumInputLength,
input:params.term,
params:params
}
});
return;
}
decorated.call(this,params,callback);
};
return MaximumInputLength;
});
S2.define('select2/data/maximumSelectionLength',[
],function(){
function MaximumSelectionLength(decorated,$e,options){
this.maximumSelectionLength=options.get('maximumSelectionLength');
decorated.call(this,$e,options);
}
MaximumSelectionLength.prototype.bind=
function(decorated,container,$container){
var self=this;
decorated.call(this,container,$container);
container.on('select',function(){
self._checkIfMaximumSelected();
});
};
MaximumSelectionLength.prototype.query=
function(decorated,params,callback){
var self=this;
this._checkIfMaximumSelected(function(){
decorated.call(self,params,callback);
});
};
MaximumSelectionLength.prototype._checkIfMaximumSelected=
function(_,successCallback){
var self=this;
this.current(function(currentData){
var count=currentData!=null?currentData.length:0;
if(self.maximumSelectionLength>0&&
count>=self.maximumSelectionLength){
self.trigger('results:message',{
message:'maximumSelected',
args:{
maximum:self.maximumSelectionLength
}
});
return;
}
if(successCallback){
successCallback();
}
});
};
return MaximumSelectionLength;
});
S2.define('select2/dropdown',[
'jquery',
'./utils'
],function($,Utils){
function Dropdown($element,options){
this.$element=$element;
this.options=options;
Dropdown.__super__.constructor.call(this);
}
Utils.Extend(Dropdown,Utils.Observable);
Dropdown.prototype.render=function(){
var $dropdown=$(
'<span class="select2-dropdown">'+
'<span class="select2-results"></span>'+
'</span>'
);
$dropdown.attr('dir',this.options.get('dir'));
this.$dropdown=$dropdown;
return $dropdown;
};
Dropdown.prototype.bind=function(){
};
Dropdown.prototype.position=function($dropdown,$container){
};
Dropdown.prototype.destroy=function(){
this.$dropdown.remove();
};
return Dropdown;
});
S2.define('select2/dropdown/search',[
'jquery',
'../utils'
],function($,Utils){
function Search(){}
Search.prototype.render=function(decorated){
var $rendered=decorated.call(this);
var $search=$(
'<span class="select2-search select2-search--dropdown">'+
'<input class="select2-search__field" type="search" tabindex="-1"'+
' autocomplete="off" autocorrect="off" autocapitalize="none"'+
' spellcheck="false" role="searchbox" aria-autocomplete="list" />'+
'</span>'
);
this.$searchContainer=$search;
this.$search=$search.find('input');
$rendered.prepend($search);
return $rendered;
};
Search.prototype.bind=function(decorated,container,$container){
var self=this;
var resultsId=container.id+'-results';
decorated.call(this,container,$container);
this.$search.on('keydown',function(evt){
self.trigger('keypress',evt);
self._keyUpPrevented=evt.isDefaultPrevented();
});
this.$search.on('input',function(evt){
$(this).off('keyup');
});
this.$search.on('keyup input',function(evt){
self.handleSearch(evt);
});
container.on('open',function(){
self.$search.attr('tabindex',0);
self.$search.attr('aria-controls',resultsId);
self.$search.trigger('focus');
window.setTimeout(function(){
self.$search.trigger('focus');
},0);
});
container.on('close',function(){
self.$search.attr('tabindex',-1);
self.$search.removeAttr('aria-controls');
self.$search.removeAttr('aria-activedescendant');
self.$search.val('');
self.$search.trigger('blur');
});
container.on('focus',function(){
if(!container.isOpen()){
self.$search.trigger('focus');
}
});
container.on('results:all',function(params){
if(params.query.term==null||params.query.term===''){
var showSearch=self.showSearch(params);
if(showSearch){
self.$searchContainer.removeClass('select2-search--hide');
}else{
self.$searchContainer.addClass('select2-search--hide');
}
}
});
container.on('results:focus',function(params){
if(params.data._resultId){
self.$search.attr('aria-activedescendant',params.data._resultId);
}else{
self.$search.removeAttr('aria-activedescendant');
}
});
};
Search.prototype.handleSearch=function(evt){
if(!this._keyUpPrevented){
var input=this.$search.val();
this.trigger('query',{
term:input
});
}
this._keyUpPrevented=false;
};
Search.prototype.showSearch=function(_,params){
return true;
};
return Search;
});
S2.define('select2/dropdown/hidePlaceholder',[
],function(){
function HidePlaceholder(decorated,$element,options,dataAdapter){
this.placeholder=this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this,$element,options,dataAdapter);
}
HidePlaceholder.prototype.append=function(decorated,data){
data.results=this.removePlaceholder(data.results);
decorated.call(this,data);
};
HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){
if(typeof placeholder==='string'){
placeholder={
id:'',
text:placeholder
};
}
return placeholder;
};
HidePlaceholder.prototype.removePlaceholder=function(_,data){
var modifiedData=data.slice(0);
for(var d=data.length-1;d>=0;d--){
var item=data[d];
if(this.placeholder.id===item.id){
modifiedData.splice(d,1);
}
}
return modifiedData;
};
return HidePlaceholder;
});
S2.define('select2/dropdown/infiniteScroll',[
'jquery'
],function($){
function InfiniteScroll(decorated,$element,options,dataAdapter){
this.lastParams={};
decorated.call(this,$element,options,dataAdapter);
this.$loadingMore=this.createLoadingMore();
this.loading=false;
}
InfiniteScroll.prototype.append=function(decorated,data){
this.$loadingMore.remove();
this.loading=false;
decorated.call(this,data);
if(this.showLoadingMore(data)){
this.$results.append(this.$loadingMore);
this.loadMoreIfNeeded();
}
};
InfiniteScroll.prototype.bind=function(decorated,container,$container){
var self=this;
decorated.call(this,container,$container);
container.on('query',function(params){
self.lastParams=params;
self.loading=true;
});
container.on('query:append',function(params){
self.lastParams=params;
self.loading=true;
});
this.$results.on('scroll',this.loadMoreIfNeeded.bind(this));
};
InfiniteScroll.prototype.loadMoreIfNeeded=function(){
var isLoadMoreVisible=$.contains(
document.documentElement,
this.$loadingMore[0]
);
if(this.loading||!isLoadMoreVisible){
return;
}
var currentOffset=this.$results.offset().top+
this.$results.outerHeight(false);
var loadingMoreOffset=this.$loadingMore.offset().top+
this.$loadingMore.outerHeight(false);
if(currentOffset+50>=loadingMoreOffset){
this.loadMore();
}
};
InfiniteScroll.prototype.loadMore=function(){
this.loading=true;
var params=$.extend({},{page:1},this.lastParams);
params.page++;
this.trigger('query:append',params);
};
InfiniteScroll.prototype.showLoadingMore=function(_,data){
return data.pagination&&data.pagination.more;
};
InfiniteScroll.prototype.createLoadingMore=function(){
var $option=$(
'<li '+
'class="select2-results__option select2-results__option--load-more"'+
'role="option" aria-disabled="true"></li>'
);
var message=this.options.get('translations').get('loadingMore');
$option.html(message(this.lastParams));
return $option;
};
return InfiniteScroll;
});
S2.define('select2/dropdown/attachBody',[
'jquery',
'../utils'
],function($,Utils){
function AttachBody(decorated,$element,options){
this.$dropdownParent=$(options.get('dropdownParent')||document.body);
decorated.call(this,$element,options);
}
AttachBody.prototype.bind=function(decorated,container,$container){
var self=this;
decorated.call(this,container,$container);
container.on('open',function(){
self._showDropdown();
self._attachPositioningHandler(container);
self._bindContainerResultHandlers(container);
});
container.on('close',function(){
self._hideDropdown();
self._detachPositioningHandler(container);
});
this.$dropdownContainer.on('mousedown',function(evt){
evt.stopPropagation();
});
};
AttachBody.prototype.destroy=function(decorated){
decorated.call(this);
this.$dropdownContainer.remove();
};
AttachBody.prototype.position=function(decorated,$dropdown,$container){
$dropdown.attr('class',$container.attr('class'));
$dropdown.removeClass('select2');
$dropdown.addClass('select2-container--open');
$dropdown.css({
position:'absolute',
top:-999999
});
this.$container=$container;
};
AttachBody.prototype.render=function(decorated){
var $container=$('<span></span>');
var $dropdown=decorated.call(this);
$container.append($dropdown);
this.$dropdownContainer=$container;
return $container;
};
AttachBody.prototype._hideDropdown=function(decorated){
this.$dropdownContainer.detach();
};
AttachBody.prototype._bindContainerResultHandlers=
function(decorated,container){
if(this._containerResultsHandlersBound){
return;
}
var self=this;
container.on('results:all',function(){
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append',function(){
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:message',function(){
self._positionDropdown();
self._resizeDropdown();
});
container.on('select',function(){
self._positionDropdown();
self._resizeDropdown();
});
container.on('unselect',function(){
self._positionDropdown();
self._resizeDropdown();
});
this._containerResultsHandlersBound=true;
};
AttachBody.prototype._attachPositioningHandler=
function(decorated,container){
var self=this;
var scrollEvent='scroll.select2.'+container.id;
var resizeEvent='resize.select2.'+container.id;
var orientationEvent='orientationchange.select2.'+container.id;
var $watchers=this.$container.parents().filter(Utils.hasScroll);
$watchers.each(function(){
Utils.StoreData(this,'select2-scroll-position',{
x:$(this).scrollLeft(),
y:$(this).scrollTop()
});
});
$watchers.on(scrollEvent,function(ev){
var position=Utils.GetData(this,'select2-scroll-position');
$(this).scrollTop(position.y);
});
$(window).on(scrollEvent+' '+resizeEvent+' '+orientationEvent,
function(e){
self._positionDropdown();
self._resizeDropdown();
});
};
AttachBody.prototype._detachPositioningHandler=
function(decorated,container){
var scrollEvent='scroll.select2.'+container.id;
var resizeEvent='resize.select2.'+container.id;
var orientationEvent='orientationchange.select2.'+container.id;
var $watchers=this.$container.parents().filter(Utils.hasScroll);
$watchers.off(scrollEvent);
$(window).off(scrollEvent+' '+resizeEvent+' '+orientationEvent);
};
AttachBody.prototype._positionDropdown=function(){
var $window=$(window);
var isCurrentlyAbove=this.$dropdown.hasClass('select2-dropdown--above');
var isCurrentlyBelow=this.$dropdown.hasClass('select2-dropdown--below');
var newDirection=null;
var offset=this.$container.offset();
offset.bottom=offset.top+this.$container.outerHeight(false);
var container={
height:this.$container.outerHeight(false)
};
container.top=offset.top;
container.bottom=offset.top+container.height;
var dropdown={
height:this.$dropdown.outerHeight(false)
};
var viewport={
top:$window.scrollTop(),
bottom:$window.scrollTop()+$window.height()
};
var enoughRoomAbove=viewport.top<(offset.top-dropdown.height);
var enoughRoomBelow=viewport.bottom>(offset.bottom+dropdown.height);
var css={
left:offset.left,
top:container.bottom
};
var $offsetParent=this.$dropdownParent;
if($offsetParent.css('position')==='static'){
$offsetParent=$offsetParent.offsetParent();
}
var parentOffset={
top:0,
left:0
};
if(
$.contains(document.body,$offsetParent[0])||
$offsetParent[0].isConnected
){
parentOffset=$offsetParent.offset();
}
css.top-=parentOffset.top;
css.left-=parentOffset.left;
if(!isCurrentlyAbove&&!isCurrentlyBelow){
newDirection='below';
}
if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){
newDirection='above';
}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){
newDirection='below';
}
if(newDirection=='above'||
(isCurrentlyAbove&&newDirection!=='below')){
css.top=container.top-parentOffset.top-dropdown.height;
}
if(newDirection!=null){
this.$dropdown
.removeClass('select2-dropdown--below select2-dropdown--above')
.addClass('select2-dropdown--'+newDirection);
this.$container
.removeClass('select2-container--below select2-container--above')
.addClass('select2-container--'+newDirection);
}
this.$dropdownContainer.css(css);
};
AttachBody.prototype._resizeDropdown=function(){
var css={
width:this.$container.outerWidth(false)+'px'
};
if(this.options.get('dropdownAutoWidth')){
css.minWidth=css.width;
css.position='relative';
css.width='auto';
}
this.$dropdown.css(css);
};
AttachBody.prototype._showDropdown=function(decorated){
this.$dropdownContainer.appendTo(this.$dropdownParent);
this._positionDropdown();
this._resizeDropdown();
};
return AttachBody;
});
S2.define('select2/dropdown/minimumResultsForSearch',[
],function(){
function countResults(data){
var count=0;
for(var d=0;d<data.length;d++){
var item=data[d];
if(item.children){
count+=countResults(item.children);
}else{
count++;
}
}
return count;
}
function MinimumResultsForSearch(decorated,$element,options,dataAdapter){
this.minimumResultsForSearch=options.get('minimumResultsForSearch');
if(this.minimumResultsForSearch<0){
this.minimumResultsForSearch=Infinity;
}
decorated.call(this,$element,options,dataAdapter);
}
MinimumResultsForSearch.prototype.showSearch=function(decorated,params){
if(countResults(params.data.results)<this.minimumResultsForSearch){
return false;
}
return decorated.call(this,params);
};
return MinimumResultsForSearch;
});
S2.define('select2/dropdown/selectOnClose',[
'../utils'
],function(Utils){
function SelectOnClose(){}
SelectOnClose.prototype.bind=function(decorated,container,$container){
var self=this;
decorated.call(this,container,$container);
container.on('close',function(params){
self._handleSelectOnClose(params);
});
};
SelectOnClose.prototype._handleSelectOnClose=function(_,params){
if(params&¶ms.originalSelect2Event!=null){
var event=params.originalSelect2Event;
if(event._type==='select'||event._type==='unselect'){
return;
}
}
var $highlightedResults=this.getHighlightedResults();
if($highlightedResults.length<1){
return;
}
var data=Utils.GetData($highlightedResults[0],'data');
if(
(data.element!=null&&data.element.selected)||
(data.element==null&&data.selected)
){
return;
}
this.trigger('select',{
data:data
});
};
return SelectOnClose;
});
S2.define('select2/dropdown/closeOnSelect',[
],function(){
function CloseOnSelect(){}
CloseOnSelect.prototype.bind=function(decorated,container,$container){
var self=this;
decorated.call(this,container,$container);
container.on('select',function(evt){
self._selectTriggered(evt);
});
container.on('unselect',function(evt){
self._selectTriggered(evt);
});
};
CloseOnSelect.prototype._selectTriggered=function(_,evt){
var originalEvent=evt.originalEvent;
if(originalEvent&&(originalEvent.ctrlKey||originalEvent.metaKey)){
return;
}
this.trigger('close',{
originalEvent:originalEvent,
originalSelect2Event:evt
});
};
return CloseOnSelect;
});
S2.define('select2/i18n/en',[],function(){
return{
errorLoading:function(){
return'The results could not be loaded.';
},
inputTooLong:function(args){
var overChars=args.input.length-args.maximum;
var message='Please delete '+overChars+' character';
if(overChars!=1){
message+='s';
}
return message;
},
inputTooShort:function(args){
var remainingChars=args.minimum-args.input.length;
var message='Please enter '+remainingChars+' or more characters';
return message;
},
loadingMore:function(){
return'Loading more results…';
},
maximumSelected:function(args){
var message='You can only select '+args.maximum+' item';
if(args.maximum!=1){
message+='s';
}
return message;
},
noResults:function(){
return'No results found';
},
searching:function(){
return'Searching…';
},
removeAllItems:function(){
return'Remove all items';
}
};
});
S2.define('select2/defaults',[
'jquery',
'require',
'./results',
'./selection/single',
'./selection/multiple',
'./selection/placeholder',
'./selection/allowClear',
'./selection/search',
'./selection/eventRelay',
'./utils',
'./translation',
'./diacritics',
'./data/select',
'./data/array',
'./data/ajax',
'./data/tags',
'./data/tokenizer',
'./data/minimumInputLength',
'./data/maximumInputLength',
'./data/maximumSelectionLength',
'./dropdown',
'./dropdown/search',
'./dropdown/hidePlaceholder',
'./dropdown/infiniteScroll',
'./dropdown/attachBody',
'./dropdown/minimumResultsForSearch',
'./dropdown/selectOnClose',
'./dropdown/closeOnSelect',
'./i18n/en'
],function($,require,
ResultsList,
SingleSelection,MultipleSelection,Placeholder,AllowClear,
SelectionSearch,EventRelay,
Utils,Translation,DIACRITICS,
SelectData,ArrayData,AjaxData,Tags,Tokenizer,
MinimumInputLength,MaximumInputLength,MaximumSelectionLength,
Dropdown,DropdownSearch,HidePlaceholder,InfiniteScroll,
AttachBody,MinimumResultsForSearch,SelectOnClose,CloseOnSelect,
EnglishTranslation){
function Defaults(){
this.reset();
}
Defaults.prototype.apply=function(options){
options=$.extend(true,{},this.defaults,options);
if(options.dataAdapter==null){
if(options.ajax!=null){
options.dataAdapter=AjaxData;
}else if(options.data!=null){
options.dataAdapter=ArrayData;
}else{
options.dataAdapter=SelectData;
}
if(options.minimumInputLength>0){
options.dataAdapter=Utils.Decorate(
options.dataAdapter,
MinimumInputLength
);
}
if(options.maximumInputLength>0){
options.dataAdapter=Utils.Decorate(
options.dataAdapter,
MaximumInputLength
);
}
if(options.maximumSelectionLength>0){
options.dataAdapter=Utils.Decorate(
options.dataAdapter,
MaximumSelectionLength
);
}
if(options.tags){
options.dataAdapter=Utils.Decorate(options.dataAdapter,Tags);
}
if(options.tokenSeparators!=null||options.tokenizer!=null){
options.dataAdapter=Utils.Decorate(
options.dataAdapter,
Tokenizer
);
}
if(options.query!=null){
var Query=require(options.amdBase+'compat/query');
options.dataAdapter=Utils.Decorate(
options.dataAdapter,
Query
);
}
if(options.initSelection!=null){
var InitSelection=require(options.amdBase+'compat/initSelection');
options.dataAdapter=Utils.Decorate(
options.dataAdapter,
InitSelection
);
}
}
if(options.resultsAdapter==null){
options.resultsAdapter=ResultsList;
if(options.ajax!=null){
options.resultsAdapter=Utils.Decorate(
options.resultsAdapter,
InfiniteScroll
);
}
if(options.placeholder!=null){
options.resultsAdapter=Utils.Decorate(
options.resultsAdapter,
HidePlaceholder
);
}
if(options.selectOnClose){
options.resultsAdapter=Utils.Decorate(
options.resultsAdapter,
SelectOnClose
);
}
}
if(options.dropdownAdapter==null){
if(options.multiple){
options.dropdownAdapter=Dropdown;
}else{
var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);
options.dropdownAdapter=SearchableDropdown;
}
if(options.minimumResultsForSearch!==0){
options.dropdownAdapter=Utils.Decorate(
options.dropdownAdapter,
MinimumResultsForSearch
);
}
if(options.closeOnSelect){
options.dropdownAdapter=Utils.Decorate(
options.dropdownAdapter,
CloseOnSelect
);
}
if(
options.dropdownCssClass!=null||
options.dropdownCss!=null||
options.adaptDropdownCssClass!=null
){
var DropdownCSS=require(options.amdBase+'compat/dropdownCss');
options.dropdownAdapter=Utils.Decorate(
options.dropdownAdapter,
DropdownCSS
);
}
options.dropdownAdapter=Utils.Decorate(
options.dropdownAdapter,
AttachBody
);
}
if(options.selectionAdapter==null){
if(options.multiple){
options.selectionAdapter=MultipleSelection;
}else{
options.selectionAdapter=SingleSelection;
}
if(options.placeholder!=null){
options.selectionAdapter=Utils.Decorate(
options.selectionAdapter,
Placeholder
);
}
if(options.allowClear){
options.selectionAdapter=Utils.Decorate(
options.selectionAdapter,
AllowClear
);
}
if(options.multiple){
options.selectionAdapter=Utils.Decorate(
options.selectionAdapter,
SelectionSearch
);
}
if(
options.containerCssClass!=null||
options.containerCss!=null||
options.adaptContainerCssClass!=null
){
var ContainerCSS=require(options.amdBase+'compat/containerCss');
options.selectionAdapter=Utils.Decorate(
options.selectionAdapter,
ContainerCSS
);
}
options.selectionAdapter=Utils.Decorate(
options.selectionAdapter,
EventRelay
);
}
options.language=this._resolveLanguage(options.language);
options.language.push('en');
var uniqueLanguages=[];
for(var l=0;l<options.language.length;l++){
var language=options.language[l];
if(uniqueLanguages.indexOf(language)===-1){
uniqueLanguages.push(language);
}
}
options.language=uniqueLanguages;
options.translations=this._processTranslations(
options.language,
options.debug
);
return options;
};
Defaults.prototype.reset=function(){
function stripDiacritics(text){
function match(a){
return DIACRITICS[a]||a;
}
return text.replace(/[^\u0000-\u007E]/g,match);
}
function matcher(params,data){
if($.trim(params.term)===''){
return data;
}
if(data.children&&data.children.length>0){
var match=$.extend(true,{},data);
for(var c=data.children.length-1;c>=0;c--){
var child=data.children[c];
var matches=matcher(params,child);
if(matches==null){
match.children.splice(c,1);
}
}
if(match.children.length>0){
return match;
}
return matcher(params,match);
}
var original=stripDiacritics(data.text).toUpperCase();
var term=stripDiacritics(params.term).toUpperCase();
if(original.indexOf(term)>-1){
return data;
}
return null;
}
this.defaults={
amdBase:'./',
amdLanguageBase:'./i18n/',
closeOnSelect:true,
debug:false,
dropdownAutoWidth:false,
escapeMarkup:Utils.escapeMarkup,
language:{},
matcher:matcher,
minimumInputLength:0,
maximumInputLength:0,
maximumSelectionLength:0,
minimumResultsForSearch:0,
selectOnClose:false,
scrollAfterSelect:false,
sorter:function(data){
return data;
},
templateResult:function(result){
return result.text;
},
templateSelection:function(selection){
return selection.text;
},
theme:'default',
width:'resolve'
};
};
Defaults.prototype.applyFromElement=function(options,$element){
var optionLanguage=options.language;
var defaultLanguage=this.defaults.language;
var elementLanguage=$element.prop('lang');
var parentLanguage=$element.closest('[lang]').prop('lang');
var languages=Array.prototype.concat.call(
this._resolveLanguage(elementLanguage),
this._resolveLanguage(optionLanguage),
this._resolveLanguage(defaultLanguage),
this._resolveLanguage(parentLanguage)
);
options.language=languages;
return options;
};
Defaults.prototype._resolveLanguage=function(language){
if(!language){
return[];
}
if($.isEmptyObject(language)){
return[];
}
if($.isPlainObject(language)){
return[language];
}
var languages;
if(!$.isArray(language)){
languages=[language];
}else{
languages=language;
}
var resolvedLanguages=[];
for(var l=0;l<languages.length;l++){
resolvedLanguages.push(languages[l]);
if(typeof languages[l]==='string'&&languages[l].indexOf('-')>0){
var languageParts=languages[l].split('-');
var baseLanguage=languageParts[0];
resolvedLanguages.push(baseLanguage);
}
}
return resolvedLanguages;
};
Defaults.prototype._processTranslations=function(languages,debug){
var translations=new Translation();
for(var l=0;l<languages.length;l++){
var languageData=new Translation();
var language=languages[l];
if(typeof language==='string'){
try{
languageData=Translation.loadPath(language);
}catch(e){
try{
language=this.defaults.amdLanguageBase+language;
languageData=Translation.loadPath(language);
}catch(ex){
if(debug&&window.console&&console.warn){
console.warn(
'Select2: The language file for "'+language+'" could '+
'not be automatically loaded. A fallback will be used instead.'
);
}
}
}
}else if($.isPlainObject(language)){
languageData=new Translation(language);
}else{
languageData=language;
}
translations.extend(languageData);
}
return translations;
};
Defaults.prototype.set=function(key,value){
var camelKey=$.camelCase(key);
var data={};
data[camelKey]=value;
var convertedData=Utils._convertData(data);
$.extend(true,this.defaults,convertedData);
};
var defaults=new Defaults();
return defaults;
});
S2.define('select2/options',[
'require',
'jquery',
'./defaults',
'./utils'
],function(require,$,Defaults,Utils){
function Options(options,$element){
this.options=options;
if($element!=null){
this.fromElement($element);
}
if($element!=null){
this.options=Defaults.applyFromElement(this.options,$element);
}
this.options=Defaults.apply(this.options);
if($element&&$element.is('input')){
var InputCompat=require(this.get('amdBase')+'compat/inputData');
this.options.dataAdapter=Utils.Decorate(
this.options.dataAdapter,
InputCompat
);
}
}
Options.prototype.fromElement=function($e){
var excludedData=['select2'];
if(this.options.multiple==null){
this.options.multiple=$e.prop('multiple');
}
if(this.options.disabled==null){
this.options.disabled=$e.prop('disabled');
}
if(this.options.dir==null){
if($e.prop('dir')){
this.options.dir=$e.prop('dir');
}else if($e.closest('[dir]').prop('dir')){
this.options.dir=$e.closest('[dir]').prop('dir');
}else{
this.options.dir='ltr';
}
}
$e.prop('disabled',this.options.disabled);
$e.prop('multiple',this.options.multiple);
if(Utils.GetData($e[0],'select2Tags')){
if(this.options.debug&&window.console&&console.warn){
console.warn(
'Select2: The `data-select2-tags` attribute has been changed to '+
'use the `data-data` and `data-tags="true"` attributes and will be '+
'removed in future versions of Select2.'
);
}
Utils.StoreData($e[0],'data',Utils.GetData($e[0],'select2Tags'));
Utils.StoreData($e[0],'tags',true);
}
if(Utils.GetData($e[0],'ajaxUrl')){
if(this.options.debug&&window.console&&console.warn){
console.warn(
'Select2: The `data-ajax-url` attribute has been changed to '+
'`data-ajax--url` and support for the old attribute will be removed'+
' in future versions of Select2.'
);
}
$e.attr('ajax--url',Utils.GetData($e[0],'ajaxUrl'));
Utils.StoreData($e[0],'ajax-Url',Utils.GetData($e[0],'ajaxUrl'));
}
var dataset={};
function upperCaseLetter(_,letter){
return letter.toUpperCase();
}
for(var attr=0;attr<$e[0].attributes.length;attr++){
var attributeName=$e[0].attributes[attr].name;
var prefix='data-';
if(attributeName.substr(0,prefix.length)==prefix){
var dataName=attributeName.substring(prefix.length);
var dataValue=Utils.GetData($e[0],dataName);
var camelDataName=dataName.replace(/-([a-z])/g,upperCaseLetter);
dataset[camelDataName]=dataValue;
}
}
if($.fn.jquery&&$.fn.jquery.substr(0,2)=='1.'&&$e[0].dataset){
dataset=$.extend(true,{},$e[0].dataset,dataset);
}
var data=$.extend(true,{},Utils.GetData($e[0]),dataset);
data=Utils._convertData(data);
for(var key in data){
if($.inArray(key,excludedData)>-1){
continue;
}
if($.isPlainObject(this.options[key])){
$.extend(this.options[key],data[key]);
}else{
this.options[key]=data[key];
}
}
return this;
};
Options.prototype.get=function(key){
return this.options[key];
};
Options.prototype.set=function(key,val){
this.options[key]=val;
};
return Options;
});
S2.define('select2/core',[
'jquery',
'./options',
'./utils',
'./keys'
],function($,Options,Utils,KEYS){
var Select2=function($element,options){
if(Utils.GetData($element[0],'select2')!=null){
Utils.GetData($element[0],'select2').destroy();
}
this.$element=$element;
this.id=this._generateId($element);
options=options||{};
this.options=new Options(options,$element);
Select2.__super__.constructor.call(this);
var tabindex=$element.attr('tabindex')||0;
Utils.StoreData($element[0],'old-tabindex',tabindex);
$element.attr('tabindex','-1');
var DataAdapter=this.options.get('dataAdapter');
this.dataAdapter=new DataAdapter($element,this.options);
var $container=this.render();
this._placeContainer($container);
var SelectionAdapter=this.options.get('selectionAdapter');
this.selection=new SelectionAdapter($element,this.options);
this.$selection=this.selection.render();
this.selection.position(this.$selection,$container);
var DropdownAdapter=this.options.get('dropdownAdapter');
this.dropdown=new DropdownAdapter($element,this.options);
this.$dropdown=this.dropdown.render();
this.dropdown.position(this.$dropdown,$container);
var ResultsAdapter=this.options.get('resultsAdapter');
this.results=new ResultsAdapter($element,this.options,this.dataAdapter);
this.$results=this.results.render();
this.results.position(this.$results,this.$dropdown);
var self=this;
this._bindAdapters();
this._registerDomEvents();
this._registerDataEvents();
this._registerSelectionEvents();
this._registerDropdownEvents();
this._registerResultsEvents();
this._registerEvents();
this.dataAdapter.current(function(initialData){
self.trigger('selection:update',{
data:initialData
});
});
$element.addClass('select2-hidden-accessible');
$element.attr('aria-hidden','true');
this._syncAttributes();
Utils.StoreData($element[0],'select2',this);
$element.data('select2',this);
};
Utils.Extend(Select2,Utils.Observable);
Select2.prototype._generateId=function($element){
var id='';
if($element.attr('id')!=null){
id=$element.attr('id');
}else if($element.attr('name')!=null){
id=$element.attr('name')+'-'+Utils.generateChars(2);
}else{
id=Utils.generateChars(4);
}
id=id.replace(/(:|\.|\[|\]|,)/g,'');
id='select2-'+id;
return id;
};
Select2.prototype._placeContainer=function($container){
$container.insertAfter(this.$element);
var width=this._resolveWidth(this.$element,this.options.get('width'));
if(width!=null){
$container.css('width',width);
}
};
Select2.prototype._resolveWidth=function($element,method){
var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
if(method=='resolve'){
var styleWidth=this._resolveWidth($element,'style');
if(styleWidth!=null){
return styleWidth;
}
return this._resolveWidth($element,'element');
}
if(method=='element'){
var elementWidth=$element.outerWidth(false);
if(elementWidth<=0){
return'auto';
}
return elementWidth+'px';
}
if(method=='style'){
var style=$element.attr('style');
if(typeof(style)!=='string'){
return null;
}
var attrs=style.split(';');
for(var i=0,l=attrs.length;i<l;i=i+1){
var attr=attrs[i].replace(/\s/g,'');
var matches=attr.match(WIDTH);
if(matches!==null&&matches.length>=1){
return matches[1];
}
}
return null;
}
if(method=='computedstyle'){
var computedStyle=window.getComputedStyle($element[0]);
return computedStyle.width;
}
return method;
};
Select2.prototype._bindAdapters=function(){
this.dataAdapter.bind(this,this.$container);
this.selection.bind(this,this.$container);
this.dropdown.bind(this,this.$container);
this.results.bind(this,this.$container);
};
Select2.prototype._registerDomEvents=function(){
var self=this;
this.$element.on('change.select2',function(){
self.dataAdapter.current(function(data){
self.trigger('selection:update',{
data:data
});
});
});
this.$element.on('focus.select2',function(evt){
self.trigger('focus',evt);
});
this._syncA=Utils.bind(this._syncAttributes,this);
this._syncS=Utils.bind(this._syncSubtree,this);
if(this.$element[0].attachEvent){
this.$element[0].attachEvent('onpropertychange',this._syncA);
}
var observer=window.MutationObserver||
window.WebKitMutationObserver||
window.MozMutationObserver
;
if(observer!=null){
this._observer=new observer(function(mutations){
self._syncA();
self._syncS(null,mutations);
});
this._observer.observe(this.$element[0],{
attributes:true,
childList:true,
subtree:false
});
}else if(this.$element[0].addEventListener){
this.$element[0].addEventListener(
'DOMAttrModified',
self._syncA,
false
);
this.$element[0].addEventListener(
'DOMNodeInserted',
self._syncS,
false
);
this.$element[0].addEventListener(
'DOMNodeRemoved',
self._syncS,
false
);
}
};
Select2.prototype._registerDataEvents=function(){
var self=this;
this.dataAdapter.on('*',function(name,params){
self.trigger(name,params);
});
};
Select2.prototype._registerSelectionEvents=function(){
var self=this;
var nonRelayEvents=['toggle','focus'];
this.selection.on('toggle',function(){
self.toggleDropdown();
});
this.selection.on('focus',function(params){
self.focus(params);
});
this.selection.on('*',function(name,params){
if($.inArray(name,nonRelayEvents)!==-1){
return;
}
self.trigger(name,params);
});
};
Select2.prototype._registerDropdownEvents=function(){
var self=this;
this.dropdown.on('*',function(name,params){
self.trigger(name,params);
});
};
Select2.prototype._registerResultsEvents=function(){
var self=this;
this.results.on('*',function(name,params){
self.trigger(name,params);
});
};
Select2.prototype._registerEvents=function(){
var self=this;
this.on('open',function(){
self.$container.addClass('select2-container--open');
});
this.on('close',function(){
self.$container.removeClass('select2-container--open');
});
this.on('enable',function(){
self.$container.removeClass('select2-container--disabled');
});
this.on('disable',function(){
self.$container.addClass('select2-container--disabled');
});
this.on('blur',function(){
self.$container.removeClass('select2-container--focus');
});
this.on('query',function(params){
if(!self.isOpen()){
self.trigger('open',{});
}
this.dataAdapter.query(params,function(data){
self.trigger('results:all',{
data:data,
query:params
});
});
});
this.on('query:append',function(params){
this.dataAdapter.query(params,function(data){
self.trigger('results:append',{
data:data,
query:params
});
});
});
this.on('keypress',function(evt){
var key=evt.which;
if(self.isOpen()){
if(key===KEYS.ESC||key===KEYS.TAB||
(key===KEYS.UP&&evt.altKey)){
self.close(evt);
evt.preventDefault();
}else if(key===KEYS.ENTER){
self.trigger('results:select',{});
evt.preventDefault();
}else if((key===KEYS.SPACE&&evt.ctrlKey)){
self.trigger('results:toggle',{});
evt.preventDefault();
}else if(key===KEYS.UP){
self.trigger('results:previous',{});
evt.preventDefault();
}else if(key===KEYS.DOWN){
self.trigger('results:next',{});
evt.preventDefault();
}
}else{
if(key===KEYS.ENTER&&this.options.get('onEnterSubmit')){
self.$element.closest('form').submit();
evt.preventDefault();
}else if(key===KEYS.ENTER||key===KEYS.SPACE||
(key===KEYS.DOWN&&evt.altKey)){
self.open();
evt.preventDefault();
}
}
});
};
Select2.prototype._syncAttributes=function(){
this.options.set('disabled',this.$element.prop('disabled'));
if(this.isDisabled()){
if(this.isOpen()){
this.close();
}
this.trigger('disable',{});
}else{
this.trigger('enable',{});
}
};
Select2.prototype._isChangeMutation=function(evt,mutations){
var changed=false;
var self=this;
if(
evt&&evt.target&&(
evt.target.nodeName!=='OPTION'&&evt.target.nodeName!=='OPTGROUP'
)
){
return;
}
if(!mutations){
changed=true;
}else if(mutations.addedNodes&&mutations.addedNodes.length>0){
for(var n=0;n<mutations.addedNodes.length;n++){
var node=mutations.addedNodes[n];
if(node.selected){
changed=true;
}
}
}else if(mutations.removedNodes&&mutations.removedNodes.length>0){
changed=true;
}else if($.isArray(mutations)){
$.each(mutations,function(evt,mutation){
if(self._isChangeMutation(evt,mutation)){
changed=true;
return false;
}
});
}
return changed;
};
Select2.prototype._syncSubtree=function(evt,mutations){
var changed=this._isChangeMutation(evt,mutations);
var self=this;
if(changed){
this.dataAdapter.current(function(currentData){
self.trigger('selection:update',{
data:currentData
});
});
}
};
Select2.prototype.trigger=function(name,args){
var actualTrigger=Select2.__super__.trigger;
var preTriggerMap={
'open':'opening',
'close':'closing',
'select':'selecting',
'unselect':'unselecting',
'clear':'clearing'
};
if(args===undefined){
args={};
}
if(name in preTriggerMap){
var preTriggerName=preTriggerMap[name];
var preTriggerArgs={
prevented:false,
name:name,
args:args
};
actualTrigger.call(this,preTriggerName,preTriggerArgs);
if(preTriggerArgs.prevented){
args.prevented=true;
return;
}
}
actualTrigger.call(this,name,args);
};
Select2.prototype.toggleDropdown=function(){
if(this.isDisabled()){
return;
}
if(this.isOpen()){
this.close();
}else{
this.open();
}
};
Select2.prototype.open=function(){
if(this.isOpen()){
return;
}
if(this.isDisabled()){
return;
}
this.trigger('query',{});
};
Select2.prototype.close=function(evt){
if(!this.isOpen()){
return;
}
this.trigger('close',{originalEvent:evt});
};
Select2.prototype.isEnabled=function(){
return!this.isDisabled();
};
Select2.prototype.isDisabled=function(){
return this.options.get('disabled');
};
Select2.prototype.isOpen=function(){
return this.$container.hasClass('select2-container--open');
};
Select2.prototype.hasFocus=function(){
return this.$container.hasClass('select2-container--focus');
};
Select2.prototype.focus=function(data){
if(this.hasFocus()){
return;
}
this.$container.addClass('select2-container--focus');
this.trigger('focus',{});
};
Select2.prototype.enable=function(args){
if(this.options.get('debug')&&window.console&&console.warn){
console.warn(
'Select2: The `select2("enable")` method has been deprecated and will'+
' be removed in later Select2 versions. Use $element.prop("disabled")'+
' instead.'
);
}
if(args==null||args.length===0){
args=[true];
}
var disabled=!args[0];
this.$element.prop('disabled',disabled);
};
Select2.prototype.data=function(){
if(this.options.get('debug')&&
arguments.length>0&&window.console&&console.warn){
console.warn(
'Select2: Data can no longer be set using `select2("data")`. You '+
'should consider setting the value instead using `$element.val()`.'
);
}
var data=[];
this.dataAdapter.current(function(currentData){
data=currentData;
});
return data;
};
Select2.prototype.val=function(args){
if(this.options.get('debug')&&window.console&&console.warn){
console.warn(
'Select2: The `select2("val")` method has been deprecated and will be'+
' removed in later Select2 versions. Use $element.val() instead.'
);
}
if(args==null||args.length===0){
return this.$element.val();
}
var newVal=args[0];
if($.isArray(newVal)){
newVal=$.map(newVal,function(obj){
return obj.toString();
});
}
this.$element.val(newVal).trigger('input').trigger('change');
};
Select2.prototype.destroy=function(){
this.$container.remove();
if(this.$element[0].detachEvent){
this.$element[0].detachEvent('onpropertychange',this._syncA);
}
if(this._observer!=null){
this._observer.disconnect();
this._observer=null;
}else if(this.$element[0].removeEventListener){
this.$element[0]
.removeEventListener('DOMAttrModified',this._syncA,false);
this.$element[0]
.removeEventListener('DOMNodeInserted',this._syncS,false);
this.$element[0]
.removeEventListener('DOMNodeRemoved',this._syncS,false);
}
this._syncA=null;
this._syncS=null;
this.$element.off('.select2');
this.$element.attr('tabindex',
Utils.GetData(this.$element[0],'old-tabindex'));
this.$element.removeClass('select2-hidden-accessible');
this.$element.attr('aria-hidden','false');
Utils.RemoveData(this.$element[0]);
this.$element.removeData('select2');
this.dataAdapter.destroy();
this.selection.destroy();
this.dropdown.destroy();
this.results.destroy();
this.dataAdapter=null;
this.selection=null;
this.dropdown=null;
this.results=null;
};
Select2.prototype.render=function(){
var $container=$(
'<span class="select2 select2-container">'+
'<span class="selection"></span>'+
'<span class="dropdown-wrapper" aria-hidden="true"></span>'+
'</span>'
);
$container.attr('dir',this.options.get('dir'));
this.$container=$container;
this.$container.addClass('select2-container--'+this.options.get('theme'));
Utils.StoreData($container[0],'element',this.$element);
return $container;
};
return Select2;
});
S2.define('select2/compat/utils',[
'jquery'
],function($){
function syncCssClasses($dest,$src,adapter){
var classes,replacements=[],adapted;
classes=$.trim($dest.attr('class'));
if(classes){
classes=''+classes;
$(classes.split(/\s+/)).each(function(){
if(this.indexOf('select2-')===0){
replacements.push(this);
}
});
}
classes=$.trim($src.attr('class'));
if(classes){
classes=''+classes;
$(classes.split(/\s+/)).each(function(){
if(this.indexOf('select2-')!==0){
adapted=adapter(this);
if(adapted!=null){
replacements.push(adapted);
}
}
});
}
$dest.attr('class',replacements.join(' '));
}
return{
syncCssClasses:syncCssClasses
};
});
S2.define('select2/compat/containerCss',[
'jquery',
'./utils'
],function($,CompatUtils){
function _containerAdapter(clazz){
return null;
}
function ContainerCSS(){}
ContainerCSS.prototype.render=function(decorated){
var $container=decorated.call(this);
var containerCssClass=this.options.get('containerCssClass')||'';
if($.isFunction(containerCssClass)){
containerCssClass=containerCssClass(this.$element);
}
var containerCssAdapter=this.options.get('adaptContainerCssClass');
containerCssAdapter=containerCssAdapter||_containerAdapter;
if(containerCssClass.indexOf(':all:')!==-1){
containerCssClass=containerCssClass.replace(':all:','');
var _cssAdapter=containerCssAdapter;
containerCssAdapter=function(clazz){
var adapted=_cssAdapter(clazz);
if(adapted!=null){
return adapted+' '+clazz;
}
return clazz;
};
}
var containerCss=this.options.get('containerCss')||{};
if($.isFunction(containerCss)){
containerCss=containerCss(this.$element);
}
CompatUtils.syncCssClasses($container,this.$element,containerCssAdapter);
$container.css(containerCss);
$container.addClass(containerCssClass);
return $container;
};
return ContainerCSS;
});
S2.define('select2/compat/dropdownCss',[
'jquery',
'./utils'
],function($,CompatUtils){
function _dropdownAdapter(clazz){
return null;
}
function DropdownCSS(){}
DropdownCSS.prototype.render=function(decorated){
var $dropdown=decorated.call(this);
var dropdownCssClass=this.options.get('dropdownCssClass')||'';
if($.isFunction(dropdownCssClass)){
dropdownCssClass=dropdownCssClass(this.$element);
}
var dropdownCssAdapter=this.options.get('adaptDropdownCssClass');
dropdownCssAdapter=dropdownCssAdapter||_dropdownAdapter;
if(dropdownCssClass.indexOf(':all:')!==-1){
dropdownCssClass=dropdownCssClass.replace(':all:','');
var _cssAdapter=dropdownCssAdapter;
dropdownCssAdapter=function(clazz){
var adapted=_cssAdapter(clazz);
if(adapted!=null){
return adapted+' '+clazz;
}
return clazz;
};
}
var dropdownCss=this.options.get('dropdownCss')||{};
if($.isFunction(dropdownCss)){
dropdownCss=dropdownCss(this.$element);
}
CompatUtils.syncCssClasses($dropdown,this.$element,dropdownCssAdapter);
$dropdown.css(dropdownCss);
$dropdown.addClass(dropdownCssClass);
return $dropdown;
};
return DropdownCSS;
});
S2.define('select2/compat/initSelection',[
'jquery'
],function($){
function InitSelection(decorated,$element,options){
if(options.get('debug')&&window.console&&console.warn){
console.warn(
'Select2: The `initSelection` option has been deprecated in favor'+
' of a custom data adapter that overrides the `current` method. '+
'This method is now called multiple times instead of a single '+
'time when the instance is initialized. Support will be removed '+
'for the `initSelection` option in future versions of Select2'
);
}
this.initSelection=options.get('initSelection');
this._isInitialized=false;
decorated.call(this,$element,options);
}
InitSelection.prototype.current=function(decorated,callback){
var self=this;
if(this._isInitialized){
decorated.call(this,callback);
return;
}
this.initSelection.call(null,this.$element,function(data){
self._isInitialized=true;
if(!$.isArray(data)){
data=[data];
}
callback(data);
});
};
return InitSelection;
});
S2.define('select2/compat/inputData',[
'jquery',
'../utils'
],function($,Utils){
function InputData(decorated,$element,options){
this._currentData=[];
this._valueSeparator=options.get('valueSeparator')||',';
if($element.prop('type')==='hidden'){
if(options.get('debug')&&console&&console.warn){
console.warn(
'Select2: Using a hidden input with Select2 is no longer '+
'supported and may stop working in the future. It is recommended '+
'to use a `<select>` element instead.'
);
}
}
decorated.call(this,$element,options);
}
InputData.prototype.current=function(_,callback){
function getSelected(data,selectedIds){
var selected=[];
if(data.selected||$.inArray(data.id,selectedIds)!==-1){
data.selected=true;
selected.push(data);
}else{
data.selected=false;
}
if(data.children){
selected.push.apply(selected,getSelected(data.children,selectedIds));
}
return selected;
}
var selected=[];
for(var d=0;d<this._currentData.length;d++){
var data=this._currentData[d];
selected.push.apply(
selected,
getSelected(
data,
this.$element.val().split(
this._valueSeparator
)
)
);
}
callback(selected);
};
InputData.prototype.select=function(_,data){
if(!this.options.get('multiple')){
this.current(function(allData){
$.map(allData,function(data){
data.selected=false;
});
});
this.$element.val(data.id);
this.$element.trigger('input').trigger('change');
}else{
var value=this.$element.val();
value+=this._valueSeparator+data.id;
this.$element.val(value);
this.$element.trigger('input').trigger('change');
}
};
InputData.prototype.unselect=function(_,data){
var self=this;
data.selected=false;
this.current(function(allData){
var values=[];
for(var d=0;d<allData.length;d++){
var item=allData[d];
if(data.id==item.id){
continue;
}
values.push(item.id);
}
self.$element.val(values.join(self._valueSeparator));
self.$element.trigger('input').trigger('change');
});
};
InputData.prototype.query=function(_,params,callback){
var results=[];
for(var d=0;d<this._currentData.length;d++){
var data=this._currentData[d];
var matches=this.matches(params,data);
if(matches!==null){
results.push(matches);
}
}
callback({
results:results
});
};
InputData.prototype.addOptions=function(_,$options){
var options=$.map($options,function($option){
return Utils.GetData($option[0],'data');
});
this._currentData.push.apply(this._currentData,options);
};
return InputData;
});
S2.define('select2/compat/matcher',[
'jquery'
],function($){
function oldMatcher(matcher){
function wrappedMatcher(params,data){
var match=$.extend(true,{},data);
if(params.term==null||$.trim(params.term)===''){
return match;
}
if(data.children){
for(var c=data.children.length-1;c>=0;c--){
var child=data.children[c];
var doesMatch=matcher(params.term,child.text,child);
if(!doesMatch){
match.children.splice(c,1);
}
}
if(match.children.length>0){
return match;
}
}
if(matcher(params.term,data.text,data)){
return match;
}
return null;
}
return wrappedMatcher;
}
return oldMatcher;
});
S2.define('select2/compat/query',[
],function(){
function Query(decorated,$element,options){
if(options.get('debug')&&window.console&&console.warn){
console.warn(
'Select2: The `query` option has been deprecated in favor of a '+
'custom data adapter that overrides the `query` method. Support '+
'will be removed for the `query` option in future versions of '+
'Select2.'
);
}
decorated.call(this,$element,options);
}
Query.prototype.query=function(_,params,callback){
params.callback=callback;
var query=this.options.get('query');
query.call(null,params);
};
return Query;
});
S2.define('select2/dropdown/attachContainer',[
],function(){
function AttachContainer(decorated,$element,options){
decorated.call(this,$element,options);
}
AttachContainer.prototype.position=
function(decorated,$dropdown,$container){
var $dropdownContainer=$container.find('.dropdown-wrapper');
$dropdownContainer.append($dropdown);
$dropdown.addClass('select2-dropdown--below');
$container.addClass('select2-container--below');
};
return AttachContainer;
});
S2.define('select2/dropdown/stopPropagation',[
],function(){
function StopPropagation(){}
StopPropagation.prototype.bind=function(decorated,container,$container){
decorated.call(this,container,$container);
var stoppedEvents=[
'blur',
'change',
'click',
'dblclick',
'focus',
'focusin',
'focusout',
'input',
'keydown',
'keyup',
'keypress',
'mousedown',
'mouseenter',
'mouseleave',
'mousemove',
'mouseover',
'mouseup',
'search',
'touchend',
'touchstart'
];
this.$dropdown.on(stoppedEvents.join(' '),function(evt){
evt.stopPropagation();
});
};
return StopPropagation;
});
S2.define('select2/selection/stopPropagation',[
],function(){
function StopPropagation(){}
StopPropagation.prototype.bind=function(decorated,container,$container){
decorated.call(this,container,$container);
var stoppedEvents=[
'blur',
'change',
'click',
'dblclick',
'focus',
'focusin',
'focusout',
'input',
'keydown',
'keyup',
'keypress',
'mousedown',
'mouseenter',
'mouseleave',
'mousemove',
'mouseover',
'mouseup',
'search',
'touchend',
'touchstart'
];
this.$selection.on(stoppedEvents.join(' '),function(evt){
evt.stopPropagation();
});
};
return StopPropagation;
});
(function(factory){
if(typeof S2.define==='function'&&S2.define.amd){
S2.define('jquery-mousewheel',['jquery'],factory);
}else if(typeof exports==='object'){
module.exports=factory;
}else{
factory(jQuery);
}
}(function($){
var toFix=['wheel','mousewheel','DOMMouseScroll','MozMousePixelScroll'],
toBind=('onwheel'in document||document.documentMode>=9)?
['wheel']:['mousewheel','DomMouseScroll','MozMousePixelScroll'],
slice=Array.prototype.slice,
nullLowestDeltaTimeout,lowestDelta;
if($.event.fixHooks){
for(var i=toFix.length;i;){
$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;
}
}
var special=$.event.special.mousewheel={
version:'3.1.12',
setup:function(){
if(this.addEventListener){
for(var i=toBind.length;i;){
this.addEventListener(toBind[--i],handler,false);
}
}else{
this.onmousewheel=handler;
}
$.data(this,'mousewheel-line-height',special.getLineHeight(this));
$.data(this,'mousewheel-page-height',special.getPageHeight(this));
},
teardown:function(){
if(this.removeEventListener){
for(var i=toBind.length;i;){
this.removeEventListener(toBind[--i],handler,false);
}
}else{
this.onmousewheel=null;
}
$.removeData(this,'mousewheel-line-height');
$.removeData(this,'mousewheel-page-height');
},
getLineHeight:function(elem){
var $elem=$(elem),
$parent=$elem['offsetParent'in $.fn?'offsetParent':'parent']();
if(!$parent.length){
$parent=$('body');
}
return parseInt($parent.css('fontSize'),10)||parseInt($elem.css('fontSize'),10)||16;
},
getPageHeight:function(elem){
return $(elem).height();
},
settings:{
adjustOldDeltas:true,
normalizeOffset:true
}
};
$.fn.extend({
mousewheel:function(fn){
return fn?this.bind('mousewheel',fn):this.trigger('mousewheel');
},
unmousewheel:function(fn){
return this.unbind('mousewheel',fn);
}
});
function handler(event){
var orgEvent=event||window.event,
args=slice.call(arguments,1),
delta=0,
deltaX=0,
deltaY=0,
absDelta=0,
offsetX=0,
offsetY=0;
event=$.event.fix(orgEvent);
event.type='mousewheel';
if('detail'in orgEvent){deltaY=orgEvent.detail*-1;}
if('wheelDelta'in orgEvent){deltaY=orgEvent.wheelDelta;}
if('wheelDeltaY'in orgEvent){deltaY=orgEvent.wheelDeltaY;}
if('wheelDeltaX'in orgEvent){deltaX=orgEvent.wheelDeltaX*-1;}
if('axis'in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS){
deltaX=deltaY*-1;
deltaY=0;
}
delta=deltaY===0?deltaX:deltaY;
if('deltaY'in orgEvent){
deltaY=orgEvent.deltaY*-1;
delta=deltaY;
}
if('deltaX'in orgEvent){
deltaX=orgEvent.deltaX;
if(deltaY===0){delta=deltaX*-1;}
}
if(deltaY===0&&deltaX===0){return;}
if(orgEvent.deltaMode===1){
var lineHeight=$.data(this,'mousewheel-line-height');
delta*=lineHeight;
deltaY*=lineHeight;
deltaX*=lineHeight;
}else if(orgEvent.deltaMode===2){
var pageHeight=$.data(this,'mousewheel-page-height');
delta*=pageHeight;
deltaY*=pageHeight;
deltaX*=pageHeight;
}
absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX));
if(!lowestDelta||absDelta<lowestDelta){
lowestDelta=absDelta;
if(shouldAdjustOldDeltas(orgEvent,absDelta)){
lowestDelta/=40;
}
}
if(shouldAdjustOldDeltas(orgEvent,absDelta)){
delta/=40;
deltaX/=40;
deltaY/=40;
}
delta=Math[delta>=1?'floor':'ceil'](delta/lowestDelta);
deltaX=Math[deltaX>=1?'floor':'ceil'](deltaX/lowestDelta);
deltaY=Math[deltaY>=1?'floor':'ceil'](deltaY/lowestDelta);
if(special.settings.normalizeOffset&&this.getBoundingClientRect){
var boundingRect=this.getBoundingClientRect();
offsetX=event.clientX-boundingRect.left;
offsetY=event.clientY-boundingRect.top;
}
event.deltaX=deltaX;
event.deltaY=deltaY;
event.deltaFactor=lowestDelta;
event.offsetX=offsetX;
event.offsetY=offsetY;
event.deltaMode=0;
args.unshift(event,delta,deltaX,deltaY);
if(nullLowestDeltaTimeout){clearTimeout(nullLowestDeltaTimeout);}
nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200);
return($.event.dispatch||$.event.handle).apply(this,args);
}
function nullLowestDelta(){
lowestDelta=null;
}
function shouldAdjustOldDeltas(orgEvent,absDelta){
return special.settings.adjustOldDeltas&&orgEvent.type==='mousewheel'&&absDelta%120===0;
}
}));
S2.define('jquery.select2',[
'jquery',
'jquery-mousewheel',
'./select2/core',
'./select2/defaults',
'./select2/utils'
],function($,_,Select2,Defaults,Utils){
if($.fn.select2==null){
var thisMethods=['open','close','destroy'];
$.fn.select2=function(options){
options=options||{};
if(typeof options==='object'){
this.each(function(){
var instanceOptions=$.extend(true,{},options);
var instance=new Select2($(this),instanceOptions);
});
return this;
}else if(typeof options==='string'){
var ret;
var args=Array.prototype.slice.call(arguments,1);
this.each(function(){
var instance=Utils.GetData(this,'select2');
if(instance==null&&window.console&&console.error){
console.error(
'The select2(\''+options+'\') method was called on an '+
'element that is not using Select2.'
);
}
ret=instance[options].apply(instance,args);
});
if($.inArray(options,thisMethods)>-1){
return this;
}
return ret;
}else{
throw new Error('Invalid arguments for Select2: '+options);
}
};
}
if($.fn.select2.defaults==null){
$.fn.select2.defaults=Defaults;
}
return Select2;
});
return{
define:S2.define,
require:S2.require
};
}());
var select2=S2.require('jquery.select2');
jQuery.fn.select2.amd=S2;
return select2;
}));
/* plugins/auto/select2/v2.1.0/lib/select2/js/i18n/fr.js?1720198650 */
!function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var n=e.input.length-e.maximum;return"Supprimez "+n+" caractère"+(n>1?"s":"")},inputTooShort:function(e){var n=e.minimum-e.input.length;return"Saisissez au moins "+n+" caractère"+(n>1?"s":"")},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1?"s":"")},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"},removeAllItems:function(){return"Supprimer tous les éléments"}}}),e.define,e.require}();
/* plugins/auto/select2/v2.1.0/javascript/SpipSelect2.js?1720198650 */
class SpipSelect2{
static helpers={
markMatch:function(text,term){
const match=text.toUpperCase().indexOf(term.toUpperCase());
const result=document.createElement('span');
if(match<0){
result.textContent=text;
return result;
}
const mark=document.createElement('span');
mark.classList.add('select2-rendered__match');
mark.textContent=text.substring(match,match+term.length);
result.insertAdjacentText('afterbegin',text.substring(0,match));
result.appendChild(mark)
result.insertAdjacentText('beforeend',text.substring(match+term.length));
return result;
},
transport:function(params,success,failure){
const request=(typeof jQuery.spip.intercepted.ajax==="function")
?jQuery.spip.intercepted.ajax(params)
:jQuery.ajax(params);
request.then(success);
request.fail(failure);
return request;
}
};
static started(node){
if(node.dataset.select2On==="on"){
return true;
}
node.dataset.select2On="on";
return false;
}
static on_select=function(select,options={}){
if(SpipSelect2.started(select)){
return;
}
if(options.ajax?.url||select.dataset['ajax-Url']||select.dataset['ajaxUrl']){
options=jQuery.extend(true,{
ajax:{
delay:250,
transport:SpipSelect2.helpers.transport
}
},options);
}
if(!options.templateResult){
options.templateResult=i=>jQuery('<span>'+(i.long_text||i.text)+'</span>');
}
if(!options.templateSelection){
options.templateSelection=i=>jQuery('<span>'+i.text+'</span>');
}
if(!options.createTag){
options.createTag=params=>{
return{
id:params.term,
text:params.term,
tag:true,
};
}
};
if(options.sortAlpha||select.dataset['sortAlpha']){
options=jQuery.extend(true,{
sorter:data=>data.sort((a,b)=>a.text.localeCompare(b.text))
},options);
}
if(options.highlightSearchTerm||select.dataset['highlightSearchTerm']){
options=jQuery.extend(true,options,{
templateResult:item=>{
if(item.loading){
return item.text;
}
const term=document.querySelector('.select2-container--open .select2-search__field[aria-controls]').value;
if(!term||!term.length){
return item.text;
}
return SpipSelect2.helpers.markMatch(item.text,term);
}
});
}
if(options.events!==undefined){
Object.entries(options.events).forEach(([eventKey,callback])=>{
jQuery(select).on(eventKey,callback);
});
}
jQuery(select).select2(options);
};
static on_input=function(input,options={}){
if(SpipSelect2.started(input)){
return;
}
const reword=input.outerHTML.replace('<input','<select');
const template=document.createElement('template');
template.innerHTML=reword.trim();
const select=template.content.firstChild;
select.classList.remove('select2');
select.removeAttribute('name');
delete select.dataset.select2On;
select.setAttribute('multiple',true);
if(select.hasAttribute('id')){
select.setAttribute('id',select.getAttribute('id').trim()+':select2');
}
if(select.hasAttribute('placeholder')){
select.dataset.placeholder=select.getAttribute('placeholder');
select.removeAttribute('placeholder');
}
if(!select.dataset.separator){
select.dataset.maximumSelectionLength=1;
}
select.dataset.tags=true;
select.dataset.onEnterSubmit=true;
if(input.getAttribute('list')){
const datalist=document.querySelector('#'+input.getAttribute('list'));
if(datalist){
select.innerHTML=datalist.innerHTML;
}
}
if(input.value){
let values=[input.value];
if(select.dataset.separator){
values=input.value.split(select.dataset.separator);
}
values.forEach(value=>{
const exists=select.querySelector("option[value='"+CSS.escape(value)+"']");
if(exists){
exists.setAttribute('selected',true);
}else{
const option=document.createElement('option');
let label=value;
if(input.dataset.optionLabel){
try{
const labels=JSON.parse(input.dataset.optionLabel);
label=labels[value]||value;
}catch(e){
console&&console.error("Failed to parse data-option-label: "+e);
}
}
option.textContent=label;
option.setAttribute('value',value);
option.setAttribute('selected',true);
select.appendChild(option);
}
});
}
const update_input=function(){
const data=Array.from(select.selectedOptions).map(option=>option.value);
input.value=data.join(select.dataset.separator||"");
input.dispatchEvent(new Event('change'));
};
options.events={
...{'change':update_input},
...(options.events||{})
};
input.setAttribute('type','hidden');
input.after(select);
SpipSelect2.on_select(select,options);
};
}
HTMLElement.prototype.spip_select2=function(options){
SpipSelect2.on_select(this,options);
}
;(()=>{
jQuery.spip.select2=SpipSelect2.helpers;
jQuery.fn.spip_select2=function(options){
SpipSelect2.on_select(this.get(),options);
};
})();
/* plugins/auto/select2/v2.1.0/javascript/SpipSelect2Loader.js?1720198650 */
class SpipSelect2Loader{
static on_select=function(){
let selector='select.select2';
if(spipConfig?.select2?.selector){
selector+=', '+spipConfig.select2.selector;
}
document.querySelectorAll(selector).forEach(select=>SpipSelect2.on_select(select));
};
static on_input=function(){
document.querySelectorAll('input.select2').forEach(input=>SpipSelect2.on_input(input));
};
static fix_focus=function(){
jQuery(document).on('select2:open',()=>{
(list=>list[list.length-1])(document.querySelectorAll('.select2-container--open .select2-search__field')).focus()
});
};
static onReady(fn){
if(document.readyState!=='loading'){
fn();
}else{
document.addEventListener('DOMContentLoaded',fn);
}
}
static load(){
SpipSelect2Loader.on_select();
SpipSelect2Loader.on_input();
}
}
SpipSelect2Loader.onReady(SpipSelect2Loader.load);
onAjaxLoad(SpipSelect2Loader.load);
SpipSelect2Loader.onReady(SpipSelect2Loader.fix_focus);
/* plugins-dist/mediabox/lib/lity/lity.js?1749555108 */
(function(window,factory){
if(typeof define==='function'&&define.amd){
define(['jquery'],function($){
return factory(window,$);
});
}else if(typeof module==='object'&&typeof module.exports==='object'){
module.exports=factory(window,require('jquery'));
}else{
window.lity=factory(window,window.jQuery||window.Zepto);
}
}(typeof window!=="undefined"?window:this,function(window,$){
'use strict';
var document=window.document;
var _win=$(window);
var _deferred=$.Deferred;
var _html=$('html');
var _instances=[];
var _attrAriaHidden='aria-hidden';
var _dataAriaHidden='lity-'+_attrAriaHidden;
var _focusableElementsSelector='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])';
var _defaultOptions={
esc:true,
handler:null,
handlers:{
image:imageHandler,
inline:inlineHandler,
iframe:iframeHandler
},
forceFocusInside:false,
template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>×</button></div></div></div>'
};
var _imageRegexp=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
var _transitionEndEvent=(function(){
var el=document.createElement('div');
var transEndEventNames={
WebkitTransition:'webkitTransitionEnd',
MozTransition:'transitionend',
OTransition:'oTransitionEnd otransitionend',
transition:'transitionend'
};
for(var name in transEndEventNames){
if(el.style[name]!==undefined){
return transEndEventNames[name];
}
}
return false;
})();
function transitionEnd(element){
var deferred=_deferred();
if(!_transitionEndEvent||!element.length){
deferred.resolve();
}else{
element.one(_transitionEndEvent,deferred.resolve);
setTimeout(deferred.resolve,500);
}
return deferred.promise();
}
function settings(currSettings,key,value){
if(arguments.length===1){
return $.extend({},currSettings);
}
if(typeof key==='string'){
if(typeof value==='undefined'){
return typeof currSettings[key]==='undefined'
?null
:currSettings[key];
}
currSettings[key]=value;
}else{
$.extend(currSettings,key);
}
return this;
}
function parseQueryParams(params){
var pos=params.indexOf('?');
if(pos>-1){
params=params.substr(pos+1);
}
var pairs=decodeURI(params.split('#')[0]).split('&');
var obj={},p;
for(var i=0,n=pairs.length;i<n;i++){
if(!pairs[i]){
continue;
}
p=pairs[i].split('=');
obj[p[0]]=p[1];
}
return obj;
}
function appendQueryParams(url,params){
if(!params){
return url;
}
if('string'===$.type(params)){
params=parseQueryParams(params);
}
if(url.indexOf('?')>-1){
var split=url.split('?');
url=split.shift();
params=$.extend(
{},
parseQueryParams(split[0]),
params
)
}
return url+'?'+$.param(params);
}
function transferHash(originalUrl,newUrl){
var pos=originalUrl.indexOf('#');
if(-1===pos){
return newUrl;
}
if(pos>0){
originalUrl=originalUrl.substr(pos);
}
return newUrl+originalUrl;
}
function iframe(iframeUrl,instance,queryParams,hashUrl){
instance&&instance.element().addClass('lity-iframe');
if(queryParams){
iframeUrl=appendQueryParams(iframeUrl,queryParams);
}
if(hashUrl){
iframeUrl=transferHash(hashUrl,iframeUrl);
}
return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+iframeUrl+'"/></div>';
}
function error(msg){
return $('<span class="lity-error"></span>').append(msg);
}
function imageHandler(target,instance){
var desc=(instance.opener()&&instance.opener().data('lity-desc'))||'Image with no description';
var img=$('<img src="'+target+'" alt="'+desc+'"/>');
var deferred=_deferred();
var failed=function(){
deferred.reject(error('Failed loading image'));
};
img
.on('load',function(){
if(this.naturalWidth===0){
return failed();
}
deferred.resolve(img);
})
.on('error',failed)
;
return deferred.promise();
}
imageHandler.test=function(target){
return _imageRegexp.test(target);
};
function inlineHandler(target,instance){
var el,placeholder,hasHideClass;
try{
el=$(target);
}catch(e){
return false;
}
if(!el.length){
return false;
}
placeholder=$('<i style="display:none !important"></i>');
hasHideClass=el.hasClass('lity-hide');
instance
.element()
.one('lity:remove',function(){
placeholder
.before(el)
.remove()
;
if(hasHideClass&&!el.closest('.lity-content').length){
el.addClass('lity-hide');
}
})
;
return el
.removeClass('lity-hide')
.after(placeholder)
;
}
function iframeHandler(target,instance){
return iframe(target,instance);
}
function winHeight(){
return document.documentElement.clientHeight
?document.documentElement.clientHeight
:Math.round(_win.height());
}
function keydown(e){
var current=currentInstance();
if(!current){
return;
}
if(e.keyCode===27&&!!current.options('esc')){
current.close();
}
if(e.keyCode===9){
handleTabKey(e,current);
}
}
function handleTabKey(e,instance){
var focusableElements=instance.element().find(_focusableElementsSelector);
var focusedIndex=focusableElements.index(document.activeElement);
if(e.shiftKey&&focusedIndex<=0){
focusableElements.get(focusableElements.length-1).focus();
e.preventDefault();
}else if(!e.shiftKey&&focusedIndex===focusableElements.length-1){
focusableElements.get(0).focus();
e.preventDefault();
}
if(focusedIndex===-1&&instance.options().forceFocusInside){
focusableElements.get(0).focus();
e.preventDefault();
}
}
function resize(){
$.each(_instances,function(i,instance){
instance.resize();
});
}
function registerInstance(instanceToRegister){
if(1===_instances.unshift(instanceToRegister)){
_html.addClass('lity-active');
_win
.on({
resize:resize,
keydown:keydown
})
;
}
$('body > *').not(instanceToRegister.element())
.addClass('lity-hidden')
.each(function(){
var el=$(this);
if(undefined!==el.data(_dataAriaHidden)){
return;
}
el.data(_dataAriaHidden,el.attr(_attrAriaHidden)||null);
})
.attr(_attrAriaHidden,'true')
;
}
function removeInstance(instanceToRemove){
var show;
instanceToRemove
.element()
.attr(_attrAriaHidden,'true')
;
if(1===_instances.length){
_html.removeClass('lity-active');
_win
.off({
resize:resize,
keydown:keydown
})
;
}
_instances=$.grep(_instances,function(instance){
return instanceToRemove!==instance;
});
if(!!_instances.length){
show=_instances[0].element();
}else{
show=$('.lity-hidden');
}
show
.removeClass('lity-hidden')
.each(function(){
var el=$(this),oldAttr=el.data(_dataAriaHidden);
if(!oldAttr){
el.removeAttr(_attrAriaHidden);
}else{
el.attr(_attrAriaHidden,oldAttr);
}
el.removeData(_dataAriaHidden);
})
;
}
function currentInstance(){
if(0===_instances.length){
return null;
}
return _instances[0];
}
function factory(target,instance,handlers,preferredHandler){
var handler='inline',content;
var currentHandlers=$.extend({},handlers);
if(preferredHandler&¤tHandlers[preferredHandler]){
content=currentHandlers[preferredHandler](target,instance);
handler=preferredHandler;
}else{
$.each(['inline','iframe'],function(i,name){
delete currentHandlers[name];
currentHandlers[name]=handlers[name];
});
$.each(currentHandlers,function(name,currentHandler){
if(!currentHandler){
return true;
}
if(
currentHandler.test&&
!currentHandler.test(target,instance)
){
return true;
}
content=currentHandler(target,instance);
if(false!==content){
handler=name;
return false;
}
});
}
return{handler:handler,content:content||''};
}
function Lity(target,options,opener,activeElement){
var self=this;
var result;
var isReady=false;
var isClosed=false;
var element;
var content;
options=$.extend(
{},
_defaultOptions,
options
);
element=$(options.template);
self.element=function(){
return element;
};
self.opener=function(){
return opener;
};
self.content=function(){
return content;
};
self.options=$.proxy(settings,self,options);
self.handlers=$.proxy(settings,self,options.handlers);
self.resize=function(){
if(!isReady||isClosed){
return;
}
content
.css('max-height',winHeight()+'px')
.trigger('lity:resize',[self])
;
};
self.close=function(){
if(isClosed){
return;
}
isClosed=true;
removeInstance(self);
var deferred=_deferred();
if(
activeElement&&
(
document.activeElement===element[0]||
$.contains(element[0],document.activeElement)
)
){
try{
activeElement.focus();
}catch(e){
}
}
var trigerable=(content?content:element);
trigerable.trigger('lity:close',[self]);
element
.removeClass('lity-opened')
.addClass('lity-closed')
;
transitionEnd(trigerable.add(element))
.always(function(){
trigerable.trigger('lity:remove',[self]);
element.remove();
element=undefined;
deferred.resolve();
})
;
return deferred.promise();
};
result=factory(target,self,options.handlers,options.handler);
element
.attr(_attrAriaHidden,'false')
.addClass('lity-loading lity-opened lity-'+result.handler)
.appendTo('body')
.focus()
.on('click','[data-lity-close]',function(e){
if($(e.target).is('[data-lity-close]')){
self.close();
}
})
.trigger('lity:open',[self])
;
registerInstance(self);
$.when(result.content)
.always(ready)
;
function ready(result){
if(isClosed){
return;
}
content=$(result)
.css('max-height',winHeight()+'px')
;
element
.find('.lity-loader')
.each(function(){
var loader=$(this);
transitionEnd(loader)
.always(function(){
loader.remove();
})
;
})
;
element
.removeClass('lity-loading')
.find('.lity-content')
.empty()
.append(content)
;
isReady=true;
content
.trigger('lity:ready',[self])
;
}
}
function lity(target,options,opener){
if(!target.preventDefault){
opener=$(opener);
}else{
target.preventDefault();
opener=$(this);
target=opener.data('lity-target')||opener.attr('href')||opener.attr('src');
}
var instance=new Lity(
target,
$.extend(
{},
opener.data('lity-options')||opener.data('lity'),
options
),
opener,
document.activeElement
);
if(!target.preventDefault){
return instance;
}
}
lity.version='3.0.0-dev';
lity.options=$.proxy(settings,lity,_defaultOptions);
lity.handlers=$.proxy(settings,lity,_defaultOptions.handlers);
lity.current=currentInstance;
lity.iframe=iframe;
$(document).on('click.lity','[data-lity]',lity);
return lity;
}));
/* plugins-dist/mediabox/lity/js/lity.mediabox.js?1749555108 */
;
(function($){
var litySpip={
nameSpace:'mediabox',
config:{
forceFocusInside:true,
},
strings:{
},
callbacks:{
onOpen:[],
onShow:[],
onClose:[]
},
focusedItem:[],
isTransition:false,
adjustHeight:function(instance){
var $content=instance.content();
var $containerHeight=instance.element().find('.lity-container').height();
if($containerHeight){
var h=Math.round($containerHeight)+'px';
$content
.css('max-height',h)
.find('[data-'+litySpip.nameSpace+'-force-max-height]')
.css('max-height',h);
}
},
template:function(cfg,type,groupName,groupPosition,groupLength){
var className='';
if(!!cfg.className){
className=' '+cfg.className;
}
if(cfg.transitionOnOpen){
className+=' lity-transition-on-open-'+cfg.transitionOnOpen;
}
if(!!cfg.noTransition){
className+=' lity-no-transition';
}
if(!!cfg.slideShow){
className+=' lity-slideshow';
}
var styles=[];
var styles_container='';
var styles_content='';
if(cfg.sideBar){
className+=' lity-sidebar lity-sidebar-'+cfg.sideBar;
if(cfg.sideBar==='start'||cfg.sideBar==='end'){
className+=' lity-sidebar-inline';
cfg.height='100vh';
cfg.maxHeight='100vh';
}
if(cfg.sideBar==='top'||cfg.sideBar==='bottom'){
className+=' lity-sidebar-block';
cfg.width='100vw';
cfg.maxWidth='100vw';
}
}
if(cfg.maxWidth){
styles.push("max-width:"+cfg.maxWidth.replace("%","vw"));
}
if(cfg.maxHeight){
styles.push("max-height:"+cfg.maxHeight.replace("%","vh"));
}
if(cfg.width){
styles.push("width:"+cfg.width.replace("%","vw"));
className+=' lity-width-set';
}
if(cfg.height){
styles.push("height:"+cfg.height.replace("%","vh"));
className+=' lity-height-set';
if(cfg.minHeight){
styles.push("min-height:"+cfg.minHeight.replace("%","vh"));
}
}
if(styles.length){
styles_container=' style="'+styles.join(';')+'"';
}
styles=[];
var max;
if(cfg.minWidth){
max=(cfg.maxWidth?cfg.maxWidth.replace("%","vw"):'95vw');
styles.push("min-width:min("+max+","+cfg.minWidth.replace("%","vw")+')');
}
if(cfg.minHeight&&!cfg.height){
max=(cfg.maxHeight?cfg.maxHeight.replace("%","vw"):'95vh');
styles.push("min-height:min("+max+","+cfg.minHeight.replace("%","vh")+')');
}
if(styles.length){
styles_content=' style="'+styles.join(';')+'"';
}
var button_next_prev='',
button_start_stop='',
group_info_text='',
group_info='';
if(groupName&&groupLength){
if(groupLength>1){
var newPosition=(groupPosition<=0?groupLength-1:groupPosition-1);
button_next_prev+='<button class="lity-previous" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'" aria-label="'+litySpip.strings.previous+'" data-lity-previous'
+'><b title="'+litySpip.strings.previous+'">❮</b></button>';
newPosition=(groupPosition>=groupLength-1?0:groupPosition+1);
button_next_prev+='<button class="lity-next" type="button" data-group-name="'+groupName+'" data-group-position="'+newPosition+'" aria-label="'+litySpip.strings.next+'" data-lity-next'
+'><b title="'+litySpip.strings.next+'">❯</b></button>';
}
group_info_text=" "+litySpip.strings.current;
group_info_text=group_info_text.replace('{current}',(groupPosition+1)+'');
group_info_text=group_info_text.replace('{total}',groupLength+'');
button_start_stop+='<button class="lity-start-stop" type="button" data-lity-stop-start>'
+'<b class="lity-start" aria-label="'+litySpip.strings.slideshowStart+'" title="'+litySpip.strings.slideshowStart+'">▶</b>'
+'<b class="lity-stop" aria-label="'+litySpip.strings.slideshowStop+'" title="'+litySpip.strings.slideshowStop+'">□</b>'
+'</button>';
group_info='<div class="lity-group-caption">'
+'<span class="lity-group-start-stop">'+button_start_stop+'</span>'
+'<span class="lity-group-current">'+group_info_text+'</span>'
+'<span class="lity-group-next-prev">'+button_next_prev+'</span>'
+'<span class="lity-group-progress-bar"><span class="lity-group-progress-bar-status" style="width:0"></span></span>'
+'</div>';
}
var close_button_aria_label=litySpip.strings.close+' ('+litySpip.strings.press_escape+')';
var dialog_title=(type==='image'?litySpip.strings.dialog_title_med:litySpip.strings.dialog_title_def);
dialog_title+=group_info_text+' ('+litySpip.strings.press_escape+')';
var t=
'<dialog class="box_mediabox box_modalbox lity'+className+'" role="dialog" aria-label="'+dialog_title+'" tabindex="-1">'
+'<div class="lity-wrap"'+(cfg.overlayClose===false?'':' data-lity-close')+' role="document">'
+'<div class="lity-loader" aria-hidden="true" aria-label="'+litySpip.strings.loading+'"><span class="box-loading"></span></div>'
+'<div class="lity-container"'+styles_container+'>'
+'<button class="lity-close" type="button" aria-label="'+close_button_aria_label+'" data-lity-close><b data-lity-close title="'+litySpip.strings.close+'">×</b></button>'
+'<div class="lity-content"'+styles_content+'></div>'
+group_info
+'</div>'
+'</div>'
+'</dialog>';
return t;
},
failHandler:function(target,instance){
return'<div class="error lity-error">Failed loading content</div>';
},
ajaxHandler:function(target,instance){
var selector,
off=target.indexOf(" ");
if(off>-1){
selector=target.slice(off);
selector=selector.match(/[^\x20\t\r\n\f]+/g)||[];
selector=selector.join(" ");
target=target.slice(0,off);
}
if(jQuery.spip.preloaded_urls[target]){
var content=jQuery.spip.preloaded_urls[target];
if(selector){
content=$("<div>").append($.parseHTML(content)).find(selector);
}
return $('<div class="lity-content-inner"></div>').append(content);
}
var _deferred=$.Deferred;
var deferred=_deferred();
var failed=function(){
deferred.reject($('<span class="error lity-error"></span>').append('Failed loading ajax'));
};
$.get(target)
.done(function(content){
jQuery.spip.preloaded_urls[target]=content;
if(selector){
content=$("<div>").append($.parseHTML(content)).find(selector);
}
deferred.resolve($('<div class="lity-content-inner"></div>').append(content));
})
.fail(failed);
return deferred.promise();
},
imageBuildContent:function(img,desc,longdesc,defaultCaptionClass){
img.attr('alt',desc?desc:'');
desc=(longdesc?longdesc:desc);
if(desc){
defaultCaptionClass=(defaultCaptionClass?defaultCaptionClass:'expanded');
var id='lity-image-caption-'+Date.now().toString(36)+Math.random().toString(36).substr(2);
img.attr('aria-describedby',id);
img=$('<figure class="lity-image-figure"></figure>').append(img).append('<figcaption id="'+id+'" class="lity-image-caption '+defaultCaptionClass+'"><div class="lity-image-caption-text">'+desc+'</div></figcaption>');
}
else{
img=$('<figure class="lity-image-figure"></figure>').append(img);
}
return img;
},
imageHandler:function(target,instance){
var _deferred=$.Deferred;
var desc='';
var longdesc='';
var defaultCaptionClass=(instance.options().defaultCaptionState==='min'?'min':'expanded');
var opener=instance.opener();
if(opener){
desc=opener.attr('title')||$('img[alt]',opener).eq(0).attr('alt')||'';
var by=opener.attr('aria-describedby')||$('img[aria-describedby]',opener).eq(0).attr('aria-describedby')||'';
if(by){
longdesc=$('#'+by).html();
longdesc=longdesc.trim();
}
if(!desc){
desc=desc||instance.opener().attr('aria-label')||'';
}
desc=desc.trim();
}
var img;
var cache=opener.data('lity-image-cache')||{};
if(cache[target]){
img=cache[target];
img=litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass);
return img;
}
img=$('<img src="'+target+'" class="lity-image-img" data-'+litySpip.nameSpace+'-force-max-height />');
var deferred=_deferred();
var failed=function(){
deferred.reject($('<span class="error lity-error"></span>').append('Failed loading image'));
};
img
.on('load',function(){
if(this.naturalWidth===0){
img.attr("style","width:25vw;");
}
cache[target]=img;
opener.data('lity-image-cache',cache);
deferred.resolve(litySpip.imageBuildContent(img,desc,longdesc,defaultCaptionClass));
})
.on('error',failed)
;
return deferred.promise();
},
groupElements:function(groupName){
return $('.lity-enabled[data-'+litySpip.nameSpace+'-group'+'='+groupName+']');
},
eventSet:{},
setEvents:function(what){
if(!litySpip.eventSet[what]){
switch(what){
case'opener':
$(document).on('click','.lity-enabled',litySpip.onClickOpener);
break;
case'listener':
$(document).on('click','.lity-previous,.lity-next',litySpip.onPrevNext);
$(document).on('click','.lity-start-stop',litySpip.onSlideShowToggle);
$(window).on('keyup',litySpip.onKeyUp);
$(document).on('click','.lity-image-caption',litySpip.onCaptionToggle);
break;
}
litySpip.eventSet[what]=true;
}
},
onKeyUp:function(event){
var c={37:"previous",39:"next"}[event.keyCode];
if(c){
var current=lity.current();
if(current){
jQuery('.lity-'+c,current.element()).trigger('click');
}
}
},
onCaptionToggle:function(event){
var $caption=$(this);
$caption.toggleClass('min expanded');
},
openerFromPrevNext($button){
var groupName=$button.data('group-name');
var groupPosition=$button.data('group-position');
return litySpip.groupElements(groupName).eq(groupPosition);
},
onPrevNext:function(event){
var $button=$(this);
var newEl=litySpip.openerFromPrevNext($button);
if(newEl){
var element=lity.current().element();
litySpip.isTransition={oldClosed:false,newOpened:true};
element.addClass('lity-no-transition').css('visibility','hidden');
litySpip.slideshowStop(element);
var options={transitionOnOpen:$button.is('.lity-next')?'slide-from-right':'slide-from-left'};
if(element.is('.lity-slideshow')){
options.slideShow=true;
}
lity.current().close();
litySpip.elementOpener(newEl,options);
}
},
slideshowStart:function(element){
var $progress=element.find('.lity-group-progress-bar-status');
$progress.attr('style','');
$progress.css('width','100%');
var delay=litySpip.config.slideshowSpeed;
setTimeout(function(){
$progress.css('transition','width '+((delay-200)/1000)+'s linear');
$progress.css('width','0');
},200);
timer=setTimeout(function(){element.find('.lity-next').trigger('click')},delay);
element.data('lity-timer',timer);
$('.lity-start',element).attr('aria-hidden','true');
$('.lity-stop',element).attr('aria-hidden','false');
jQuery('.lity-start-stop',element).focus();
},
slideshowStop:function(element){
timer=element.data('lity-timer');
if(timer){
clearTimeout(timer);
}
},
onSlideShowToggle:function(event){
var $button=$(this);
var element=$button.closest('.lity');
var slideShowState=(element.is('.lity-slideshow')?true:false);
var timer;
if(!slideShowState){
litySpip.slideshowStart(element);
}
else{
litySpip.slideshowStop(element);
$('.lity-start',element).attr('aria-hidden','false');
$('.lity-stop',element).attr('aria-hidden','true');
}
element.toggleClass('lity-slideshow');
},
onClickOpener:function(event){
event.preventDefault();
var opener=$(this);
litySpip.elementOpener(opener);
},
elementOpener:function(opener,options){
var cfg=opener.data('mediabox-options');
if(options){
cfg=$.extend({},cfg,options);
}
var target=opener.data('href-popin')||opener.data('href')||opener.attr('href')||opener.attr('src');
litySpip.lityOpener(target,cfg,opener.get(0));
},
lityOpener:function(target,cfg,opener){
litySpip.setEvents('listener');
if(!litySpip.isTransition){
litySpip.callbacks.onOpen.push(cfg.onOpen||false);
litySpip.callbacks.onShow.push(cfg.onShow||false);
litySpip.callbacks.onClose.push(cfg.onClose||false);
litySpip.focusedItem.push($(document.activeElement));
}
var type=cfg.type||'';
if(!type&&opener){
type=$(opener).data(litySpip.nameSpace+'-type')||'';
}
var handlers=lity.handlers();
if(type==='ajax'){
handlers.ajax=litySpip.ajaxHandler;
}
handlers.image=litySpip.imageHandler;
if(type==='inline'){
var el=[];
try{
el=$(target);
}catch(e){
el=[];
}
if(!el.length){
handlers.inline=litySpip.failHandler;
}
}
cfg=$.extend({handlers:handlers},cfg);
if(type&&['image','inline','ajax','iframe'].indexOf(type)!==-1){
cfg.handler=type;
}
if(opener&&typeof($.parseMediaboxOptions)!=="undefined"){
cfg=$.extend(cfg,$.parseMediaboxOptions(litySpip.nameSpace,opener));
}
if(!!cfg.preloadOnly){
litySpip.lityPreLoader(target,cfg,opener);
}
else{
var groupPosition=0;
var groupLength=0;
if(opener){
var groupName=cfg.rel||(opener?$(opener).data(litySpip.nameSpace+'-group'):'');
if(groupName){
var elements=litySpip.groupElements(groupName);
groupPosition=elements.index($(opener));
groupLength=elements.length;
}
}
cfg=$.extend({template:litySpip.template(cfg,type,groupName,groupPosition,groupLength)},cfg);
if(cfg.samePopin){
var l=lity.current();
if(l){
l.close();
}
}
lity(target,cfg,opener);
}
},
lityPreLoader:function(target,cfg,opener){
if(cfg.handler&&cfg.handlers[cfg.handler]){
if(cfg.handler==='image'||cfg.handler==='ajax'){
var instance={
opener:function(){return $(opener);},
options:function(){return cfg}
};
var content=cfg.handlers[cfg.handler](target,instance);
}
}
}
}
jQuery.fn.extend({
mediabox:function(options){
var cfg=$.extend({},litySpip.config,options);
if(this===jQuery.fn){
var href=cfg.href||"";
litySpip.lityOpener(href,cfg,null);
return this;
}else{
if(cfg.rel){
this.attr('data-'+litySpip.nameSpace+'-group',cfg.rel);
}
else{
this.each(function(){
var rel=$(this).attr('rel');
if(rel){
$(this).attr('data-'+litySpip.nameSpace+'-group',rel);
}
});
}
litySpip.setEvents('opener');
this
.data('mediabox-options',cfg)
.addClass('lity-enabled');
(cfg.preload?this:this.filter('[data-'+litySpip.nameSpace+'-preload]')).each(function(){
litySpip.elementOpener($(this),{preloadOnly:true});
});
return this;
}
},
mediaboxClose:function(){
var $current=lity.current();
if($current){
$current.close();
return true;
}
return false;
}
});
var initConfig=function(){
var b=typeof(mediabox_settings)=='object'?mediabox_settings:{};
litySpip.nameSpace=b.ns?b.ns:'mediabox';
litySpip.strings.slideshowStart=b.str_ssStart;
litySpip.strings.slideshowStop=b.str_ssStop;
litySpip.strings.current=b.str_cur;
litySpip.strings.previous=b.str_prev;
litySpip.strings.next=b.str_next;
litySpip.strings.close=b.str_close;
litySpip.strings.loading=b.str_loading;
litySpip.strings.press_escape=b.str_petc;
litySpip.strings.dialog_title_def=b.str_dialTitDef;
litySpip.strings.dialog_title_med=b.str_dialTitMed;
litySpip.config.slideshowSpeed=(b.lity.slideshow_speed?b.lity.slideshow_speed:5000);
litySpip.config.defaultCaptionState=(b.lity.defaultCaptionState?b.lity.defaultCaptionState:'expanded');
var styles={
'container':'',
'content':'',
};
var max;
if(b.lity.minWidth){
max=(b.lity.maxWidth?b.lity.maxWidth.replace('%','vw'):'95vw');
styles.content+="min-width:min("+max+","+b.lity.minWidth.replace('%','vw')+');';
}
if(b.lity.maxWidth){
styles.container+="max-width:"+b.lity.maxWidth.replace('%','vw')+';';
}
if(b.lity.minHeight){
max=(b.lity.maxHeight?b.lity.maxHeight.replace('%','vw'):'95vh');
styles.content+="min-height:min("+max+","+b.lity.minHeight.replace('%','vh')+');';
}
if(b.lity.maxHeight){
styles.container+="max-height:"+b.lity.maxHeight.replace('%','vh')+';';
}
var insert='';
for(let key in styles){
if(styles[key]){
insert+='.box_mediabox .lity-'+key+'{'+styles[key]+'}';
}
}
if(b.lity.opacite){
insert+='.box_mediabox:before{opacity:'+b.lity.opacite+'}';
}
if(insert){
$('head').append($('<style type="text/css">'+insert+'</style>'));
}
$(document).on('lity:open',function(event,instance){
if(!instance.element().is('.lity-slideshow')){
jQuery('.lity-close',instance.element()).focus();
}
if(!litySpip.isTransition){
var callback=litySpip.callbacks.onOpen.pop();
if(callback){
callback(event,instance);
}
}
});
$(document).on('lity:ready',function(event,instance){
litySpip.adjustHeight(instance);
if(jQuery.spip){
jQuery.spip.triggerAjaxLoad(instance.element().get(0))
}
if(instance.element().addClass('lity-ready').is('.lity-slideshow')){
litySpip.slideshowStart(instance.element());
}
if(!litySpip.isTransition){
var callback=litySpip.callbacks.onShow.pop();
if(callback){
callback(event,instance);
}
}
else{
litySpip.isTransition.newOpened=true;
if(litySpip.isTransition.oldClosed){
litySpip.isTransition=false;
}
instance.content().trigger('lity:resize',[instance]);
}
var $next=instance.element().find('.lity-next');
if($next.length){
$next=litySpip.openerFromPrevNext($next);
if($next){
litySpip.elementOpener($next,{preloadOnly:true});
}
}
});
$(document).on('lity:close',function(event,instance){
if(!litySpip.isTransition){
if(litySpip.callbacks.onShow.length>litySpip.callbacks.onOpen.length){
litySpip.callbacks.onShow.pop();
}
var callback=litySpip.callbacks.onClose.pop();
if(callback){
callback(event,instance);
}
}
});
$(document).on('lity:remove',function(event,instance){
if(!litySpip.isTransition){
var focused=litySpip.focusedItem.pop();
if(focused){
try{
focused.focus();
}catch(e){
}
}
}
else{
litySpip.isTransition.oldClosed=true;
if(litySpip.isTransition.newOpened){
litySpip.isTransition=false;
}
}
});
$(document).on('lity:resize',function(event,instance){
litySpip.adjustHeight(instance);
});
}
initConfig();
})(jQuery);
/* plugins-dist/mediabox/javascript/spip.mediabox.js?1749555108 */
(function($){
$.mediabox
=function(options){
if(typeof(mediabox_autodetect_href)=='function'
&&options.href
&&!options.type){
options.type=mediabox_autodetect_href(options.href);
}
$.fn.mediabox(options);
};
$.modalboxload=$.modalbox=function(href,options){$.mediabox($.extend({href:href,overlayClose:true},options));};
$.modalboxclose=$.mediaboxClose=$.fn.mediaboxClose;
$.parseMediaboxOptions=function(nameSpace,opener){
var options={};
var data2options={
"width":"width",
"height":"height",
"min-width":"minWidth",
"min-height":"minHeight",
"max-width":"maxWidth",
"max-height":"maxHeight",
"caption-state":"defaultCaptionState",
"sidebar":"sideBar",
"class":"className"
};
var v;
for(var o in data2options){
v=($(opener).data(nameSpace+'-'+o)||'');
if(v){
options[data2options[o]]=v;
}
}
if(!options.length){
var eltclass=$(opener).prop('class');
if(eltclass){
if(eltclass.indexOf("boxWidth-")!==-1){
var w=eltclass.match(/boxWidth-([^\s'">]*)/);
w=w[1].replace(/pc/,'%');
options["width"]=w;
}
if(eltclass.indexOf("boxHeight-")!==-1){
var h=eltclass.match(/boxHeight-([^\s'">]*)/);
h=h[1].replace(/pc/,'%');
options["height"]=h;
}
if(eltclass.indexOf("boxIframe")!==-1){
options["type"]='iframe';
}
if(eltclass.indexOf("boxInline")!==-1){
options["type"]='inline';
}
}
}
data2options={"same-popin":"samePopin","type":"type"};
for(var o in data2options){
v=($(opener).data(nameSpace+'-'+o)||'');
if(v){
options[data2options[o]]=v;
}
}
return options;
}
})(jQuery);
var mediaboxInit=function(){
var b=$.extend({},mediabox_settings);
if(b.ns!=='box'){
$('[data-box-type]').each(function(i,e){
var $e=$(e);
var d=$e.attr('data-box-type');
$e.removeAttr('data-box-type').attr('data-'+b.ns+'-type',d);
});
}
if(b.auto_detect){
var $popins=$('[data-href-popin],[data-'+b.ns+'-type]'+(window.var_zajax_content?',[data-var_zajax],a.popin':''))
.add(b.sel_c)
.not(ajaxbloc_selecteur,'.ajaxbloc','.hasbox');
$popins.each(function(i,e){
var $e=$(e);
var url=$e.attr('href')||"./";
var popin=$e.attr('data-href-popin');
var type=$e.attr('data-'+b.ns+'-type')||'';
if(!popin){
var env=$e.attr('data-ajax-env');
if(env){
url=parametre_url(parametre_url(url,'var_ajax',1),'var_ajax_env',env)
$e.removeAttr('data-ajax-env');
type='ajax';
}
var za=$e.attr('data-var_zajax');
if(za!==undefined||$e.hasClass('popin')){
if(za==='content'&&window.var_zajax_content){
za=window.var_zajax_content;
}
url=parametre_url(url,'var_zajax',za||window.var_zajax_content);
$e.removeAttr('data-var_zajax');
type='ajax';
}
if((url!==$e.attr('href')||(!popin&&type))&&url!=="./"){
$e.attr('data-href-popin',url);
}
}
url=popin||url;
if(!type){
var attrs=$e.data();
var types=['inline','html','iframe','image','ajax'];
types.some(function(e){
var k=b.ns+e.charAt(0).toUpperCase()+e.slice(1);
if(attrs[k]){
type=e;
return true;
}
});
}
if(!type&&typeof(mediabox_autodetect_href)=='function'){
type=mediabox_autodetect_href(url);
}
if(!type||$e.hasClass('boxIframe')){
type="iframe";
$e.removeClass('boxIframe');
}
$e.attr('data-'+b.ns+'-type',type);
});
}
if(b.sel_g){
var $items=$();
$(b.sel_g).each(function(i,e){
$items=$items.add(
$(this).is('a[type^=\'image\']')
?$(this)
:$(this).find('a[type^=\'image\']')
);
});
$items
.not('.hasbox')
.removeAttr('onclick')
.mediabox({rel:'galerieauto',slideshow:true,slideshowAuto:false,type:'image'})
.addClass('hasbox');
}
if(b.tt_img){
$('a[type^="image"],a[href$=".png"],a[href$=".jpg"],a[href$=".jpeg"],a[href$=".svg"],a[href$=".webp"]')
.not('.hasbox')
.removeAttr('onclick')
.mediabox({type:'image'})
.addClass('hasbox')
;
}
$(b.sel_c)
.not('.hasbox')
.mediabox()
.addClass('hasbox')
;
$('[data-href-popin]',this)
.not('.hasbox')
.click(function(){if($.modalbox)$.modalbox($(this).attr('data-href-popin'),$.parseMediaboxOptions(b.ns,this));return false;})
.addClass('hasbox');
};
(function($){
if(typeof onAjaxLoad=='function')onAjaxLoad(mediaboxInit);
$(mediaboxInit);
})(jQuery);
function mediabox_autodetect_href(href,options){
options=$.extend({
breakMode:true,
tests:{
image:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
inline:/^[#.]\w/,
html:/^\s*<[\w!][^<]*>/,
ajax:/((\?|&(amp;)?)var_z?ajax=|cache-ajaxload\/)/i,
iframe:/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/i,
},
},options);
var matched=options.breakMode?false:[];
$.each(options.tests,function(type,regex){
if(href.match(regex)&&!href.match('/File:[^/]+(\\#|[?]|$)')){
if(options.breakMode){
matched=type;
return false;
}else{
matched.push(type);
}
}
});
return matched;
};
/* plugins-dist/porte_plume/javascript/jquery.markitup_pour_spip.js?1749555110 */
;(function($){
$.fn.markItUp=function(settings,extraSettings){
var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;
markitup_prompt=false;
if(typeof settings=='string'){
method=settings;
params=extraSettings;
}
options={id:'',
nameSpace:'',
root:'',
lang:'',
previewHandler:false,
previewInWindow:'',
previewInElement:'',
previewAutoRefresh:true,
previewPosition:'after',
previewTemplatePath:'~/templates/preview.html',
previewParser:false,
previewParserPath:'',
previewParserVar:'data',
previewParserAjaxType:'POST',
resizeHandle:true,
beforeInsert:'',
afterInsert:'',
onEnter:{},
onShiftEnter:{},
onCtrlEnter:{},
onTab:{},
markupSet:[{}]
};
$.extend(options,settings,extraSettings);
if(!options.root){
$('script').each(function(a,tag){
var miuScript=$(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);
if(miuScript!==null){
options.root=miuScript[1];
}
});
}
var uaMatch=function(ua){
ua=ua.toLowerCase();
var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||
ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||
[];
return{
browser:match[1]||"",
version:match[2]||"0"
};
};
var matched=uaMatch(navigator.userAgent);
var browser={};
if(matched.browser){
browser[matched.browser]=true;
browser.version=matched.version;
}
if(browser.chrome){
browser.webkit=true;
}else if(browser.webkit){
browser.safari=true;
}
return this.each(function(){
var $$,textarea,levels,scrollPosition,caretPosition,
clicked,hash,header,footer,previewWindow,template,iFrame,abort,
before,after;
$$=$(this);
textarea=this;
levels=[];
abort=false;
scrollPosition=caretPosition=0;
caretOffset=-1;
options.previewParserPath=localize(options.previewParserPath);
options.previewTemplatePath=localize(options.previewTemplatePath);
if(method){
switch(method){
case'remove':
remove();
break;
case'insert':
markup(params);
break;
default:
$.error('Method '+method+' does not exist on jQuery.markItUp');
}
return;
}
function localize(data,inText){
if(inText){
return data.replace(/("|')~\//g,"$1"+options.root);
}
return data.replace(/^~\//,options.root);
}
function init(){
id='';nameSpace='';
if(options.id){
id='id="'+options.id+'"';
}else if($$.attr("id")){
id='id="markItUp'+($$.attr("id").substr(0,1).toUpperCase())+($$.attr("id").substr(1))+'"';
}
if(options.nameSpace){
nameSpace='class="'+options.nameSpace+'"';
}
currentScrollPosition=$$.scrollTop();
$$.wrap('<div '+nameSpace+'></div>');
$$.wrap('<div '+id+' class="markItUp"></div>');
$$.wrap('<div class="markItUpContainer"></div>');
$$.addClass("markItUpEditor");
$$.scrollTop(currentScrollPosition);
header=$('<div class="markItUpHeader"></div>').insertBefore($$);
$(dropMenus(options.markupSet)).appendTo(header);
$(header).find("li.markItUpDropMenu ul:empty").parent().remove();
footer=$('<div class="markItUpFooter"></div>').insertAfter($$);
if(options.resizeHandle===true&&browser.safari!==true){
resizeHandle=$('<div class="markItUpResizeHandle"></div>')
.insertAfter($$)
.on("mousedown.markItUp",function(e){
var h=$$.height(),y=e.clientY,mouseMove,mouseUp;
mouseMove=function(e){
$$.css("height",Math.max(20,e.clientY+h-y)+"px");
return false;
};
mouseUp=function(e){
$("html").off("mousemove.markItUp",mouseMove).off("mouseup.markItUp",mouseUp);
return false;
};
$("html").on("mousemove.markItUp",mouseMove).on("mouseup.markItUp",mouseUp);
});
footer.append(resizeHandle);
}
$$.on('keydown.markItUp',keyPressed).on('keyup',keyPressed);
$$.on("insertion.markItUp",function(e,settings){
if(settings.target!==false){
get();
}
if(textarea===$.markItUp.focused){
markup(settings);
}
});
$$.on('focus.markItUp',function(){
$.markItUp.focused=this;
});
if(options.previewInElement){
refreshPreview();
}
}
function dropMenus(markupSet){
var ul=$('<ul></ul>'),i=0;
var lang=($$.attr('lang')||options.lang);
$('li:hover > ul',ul).css('display','block');
$.each(markupSet,function(){
var button=this,t='',title,li,j;
if((!lang||!button.lang||($.inArray(lang,button.lang)!=-1))
&&(!button.lang_not||($.inArray(lang,button.lang_not)==-1))){
button.title?title=(button.key)?(button.title||'')+' [Ctrl+'+button.key+']':(button.title||''):title=(button.key)?(button.name||'')+' [Ctrl+'+button.key+']':(button.name||'');
key=(button.key)?'accesskey="'+button.key+'"':'';
if(button.separator){
li=$('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul);
}else{
i++;
for(j=levels.length-1;j>=0;j--){
t+=levels[j]+"-";
}
li=$('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="#" '+key+' title="'+title+'"><em>'+(button.name||'')+'</em></a></li>')
.on("contextmenu.markItUp",function(){
return false;
}).on('click.markItUp',function(e){
e.preventDefault();
}).on("focusin.markItUp",function(){
setTimeout(function(){
$$.focus();
},0);
}).on('mouseup',function(e){
if(button.call){
eval(button.call)(e);
}
setTimeout(function(){markup(button)},1);
return false;
}).on('mouseenter.markItUp',function(){
$('> a',this).addClass('active');
$('> ul',this).addClass('expanded');
$(document).one('click',function(){
$('ul a',header).removeClass('active');
$('ul ul',header).removeClass('expanded');
}
);
}).on('mouseleave.markItUp',function(){
$('> a',this).removeClass('active');
$('> ul',this).removeClass('expanded');
}).appendTo(ul);
if(button.dropMenu){
levels.push(i);
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu));
}
}
}
});
levels.pop();
return ul;
}
function magicMarkups(string){
if(string){
string=string.toString();
string=string.replace(/\(\!\(([\s\S]*?)\)\!\)/g,
function(x,a){
var b=a.split('|!|');
if(altKey===true){
return(b[1]!==undefined)?b[1]:b[0];
}else{
return(b[1]===undefined)?"":b[0];
}
}
);
string=string.replace(/\[\!\[([\s\S]*?)\]\!\]/g,
function(x,a){
var b=a.split(':!:');
if(abort===true){
return false;
}
markitup_prompt=true;
value=prompt(b[0],(b[1])?b[1]:'');
if(value===null){
abort=true;
}
setTimeout(function(){markitup_prompt=false;},500);
return value;
}
);
return string;
}
return"";
}
function prepare(action){
if($.isFunction(action)){
action=action(hash);
}
return magicMarkups(action);
}
function build(string){
var openWith=prepare(clicked.openWith);
var placeHolder=prepare(clicked.placeHolder);
var replaceWith=prepare(clicked.replaceWith);
var closeWith=prepare(clicked.closeWith);
var openBlockWith=prepare(clicked.openBlockWith);
var closeBlockWith=prepare(clicked.closeBlockWith);
var multiline=clicked.multiline;
if(replaceWith!==""){
block=openWith+replaceWith+closeWith;
}else if(selection===''&&placeHolder!==''){
block=openWith+placeHolder+closeWith;
}else if(multiline===true){
string=string||selection;
var lines=[string],blocks=[];
if(multiline===true){
lines=string.split(/\r?\n/);
}
for(var l=0;l<lines.length;l++){
line=lines[l];
var trailingSpaces;
if(trailingSpaces=line.match(/ *$/)){
blocks.push(openWith+line.replace(/ *$/g,'')+closeWith+trailingSpaces);
}else{
blocks.push(openWith+line+closeWith);
}
}
block=blocks.join("\n");
}else{
block=openWith+(string||selection)+closeWith;
}
block=openBlockWith+block+closeBlockWith;
return{block:block,
openBlockWith:openBlockWith,
openWith:openWith,
replaceWith:replaceWith,
placeHolder:placeHolder,
closeWith:closeWith,
closeBlockWith:closeBlockWith
};
}
function selectWord(){
selectionBeforeAfter(/\s|[.,;:!¡?¿()]/);
selectionSave();
}
function selectLine(){
selectionBeforeAfter(/\r?\n/);
selectionSave();
}
function selectionRemoveLast(pattern){
if(!pattern)pattern=/\s/;
last=selection[selection.length-1];
if(last&&last.match(pattern)){
set(caretPosition,selection.length-1);
get();
$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
}
}
function selectionBeforeAfter(pattern){
if(!pattern)pattern=/\s/;
sautAvantIE=sautApresIE=0;
if(browser.msie){
lenSelection=selection.length-fixIeBug(selection);
if(caretPosition){
set(caretPosition-1,2);
sautAvantIE=fixIeBug(document.selection.createRange().text);
}
set(caretPosition,2);
sautApresIE=fixIeBug(document.selection.createRange().text);
set(0,caretPosition);
before=document.selection.createRange().text;
set(caretPosition+lenSelection,textarea.value.length);
after=document.selection.createRange().text;
set(caretPosition,lenSelection);
selection=document.selection.createRange().text;
}else{
before=textarea.value.substring(0,caretPosition);
after=textarea.value.substring(caretPosition+selection.length-fixIeBug(selection));
}
before=before.split(pattern);
after=after.split(pattern);
if(sautAvantIE)before.push("");
if(sautApresIE)after.unshift("");
}
function selectionSave(){
nb_before=before?before[before.length-1].length:0;
nb_after=after?after[0].length:0;
nb=nb_before+selection.length+nb_after-fixIeBug(selection);
caretPosition=caretPosition-nb_before;
set(caretPosition,nb);
get();
$.extend(hash,{selection:selection,caretPosition:caretPosition,scrollPosition:scrollPosition});
}
function markup(button){
var len,j,n,i;
hash=clicked=button;
get();
$.extend(hash,{line:"",
root:options.root,
textarea:textarea,
selection:(selection||''),
caretPosition:caretPosition,
ctrlKey:ctrlKey,
shiftKey:shiftKey,
altKey:altKey
}
);
if(button.selectionType){
if(button.selectionType=="word"){
if(!selection){
selectWord();
}else{
selectionRemoveLast(/\s/);
}
}
if(button.selectionType=="line"){
selectLine();
}
if(button.selectionType=="return"){
if(!browser.msie){
selectionBeforeAfter(/\r?\n/);
before_last=before[before.length-1];
after='';
if(r=before_last.match(/^-([*#]+) ?(.*)$/)){
if(r[2]){
button.replaceWith="\n-"+r[1]+' ';
before_last='';
}else{
button.replaceWith="\n";
}
}else{
before_last='';
button.replaceWith="\n";
}
before[before.length-1]=before_last;
selectionSave();
}
}
}
prepare(options.beforeInsert);
prepare(clicked.beforeInsert);
if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
prepare(clicked.beforeMultiInsert);
}
$.extend(hash,{line:1});
if((ctrlKey===true&&shiftKey===true)||button.forceMultiline===true){
lines=selection.split(/\r?\n/);
for(j=0,n=lines.length,i=0;i<n;i++){
if(n==1||$.trim(lines[i])!==''){
$.extend(hash,{line:++j,selection:lines[i]});
lines[i]=build(lines[i]).block;
}else{
lines[i]="";
}
}
string={block:lines.join('\n')};
start=caretPosition;
len=string.block.length+((browser.opera)?n-1:0);
}else if(ctrlKey===true){
string=build(selection);
start=caretPosition+string.openWith.length;
len=string.block.length-string.openWith.length-string.closeWith.length;
len=len-(string.block.match(/ $/)?1:0);
len-=fixIeBug(string.block);
}else if(shiftKey===true){
string=build(selection);
start=caretPosition;
len=string.block.length;
len-=fixIeBug(string.block);
}else{
string=build(selection);
start=caretPosition+string.block.length;
len=0;
start-=fixIeBug(string.block);
}
if((selection===''&&string.replaceWith==='')){
caretOffset+=fixOperaBug(string.block);
start=caretPosition+string.openBlockWith.length+string.openWith.length;
len=string.block.length-string.openBlockWith.length-string.openWith.length-string.closeWith.length-string.closeBlockWith.length;
caretOffset=$$.val().substring(caretPosition,$$.val().length).length;
caretOffset-=fixOperaBug($$.val().substring(0,caretPosition));
}
$.extend(hash,{caretPosition:caretPosition,scrollPosition:scrollPosition});
if(string.block!==selection&&abort===false){
insert(string.block);
set(start,len);
}else{
caretOffset=-1;
}
get();
$.extend(hash,{line:'',selection:selection});
if((ctrlKey===true&&shiftKey===true)||button.multiline===true){
prepare(clicked.afterMultiInsert);
}
prepare(clicked.afterInsert);
prepare(options.afterInsert);
if(previewWindow&&options.previewAutoRefresh){
refreshPreview();
}
textarea.dispatchEvent(new Event('input'));
shiftKey=altKey=ctrlKey=abort=false;
}
function fixOperaBug(string){
if(browser.opera){
return string.length-string.replace(/\n*/g,'').length;
}
return 0;
}
function fixIeBug(string){
if(browser.msie){
return string.length-string.replace(/\r*/g,'').length;
}
return 0;
}
function insert(block){
if(document.selection){
var newSelection=document.selection.createRange();
newSelection.text=block;
}else{
textarea.value=textarea.value.substring(0,caretPosition)+block+textarea.value.substring(caretPosition+selection.length,textarea.value.length);
}
}
function set(start,len){
if(textarea.createTextRange){
if(browser.opera&&browser.version>=9.5&&len==0){
return false;
}
range=textarea.createTextRange();
range.collapse(true);
range.moveStart('character',start);
range.moveEnd('character',len);
range.select();
}else if(textarea.setSelectionRange){
textarea.setSelectionRange(start,start+len);
}
textarea.scrollTop=scrollPosition;
textarea.focus();
}
function get(){
textarea.focus();
scrollPosition=textarea.scrollTop;
if(document.selection){
selection=document.selection.createRange().text;
if(browser.msie){
var range=document.selection.createRange(),rangeCopy=range.duplicate();
rangeCopy.moveToElementText(textarea);
caretPosition=-1;
while(rangeCopy.inRange(range)){
rangeCopy.moveStart('character');
caretPosition++;
}
}else{
caretPosition=textarea.selectionStart;
}
}else{
caretPosition=textarea.selectionStart;
selection=textarea.value.substring(caretPosition,textarea.selectionEnd);
}
return selection;
}
function preview(){
if(typeof options.previewHandler==='function'){
previewWindow=true;
}else if(options.previewInElement){
previewWindow=$(options.previewInElement);
}else if(!previewWindow||previewWindow.closed){
if(options.previewInWindow){
previewWindow=window.open('','preview',options.previewInWindow);
$(window).unload(function(){
previewWindow.close();
});
}else{
iFrame=$('<iframe class="markItUpPreviewFrame"></iframe>');
if(options.previewPosition=='after'){
iFrame.insertAfter(footer);
}else{
iFrame.insertBefore(header);
}
previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1];
}
}else if(altKey===true){
if(iFrame){
iFrame.remove();
}else{
previewWindow.close();
}
previewWindow=iFrame=false;
}
if(!options.previewAutoRefresh){
refreshPreview();
}
if(options.previewInWindow){
previewWindow.focus();
}
}
function refreshPreview(){
renderPreview();
}
function renderPreview(){
var phtml;
var parsedData=$$.val();
if(options.previewParser&&typeof options.previewParser==='function'){
parsedData=options.previewParser(parsedData);
}
if(options.previewHandler&&typeof options.previewHandler==='function'){
options.previewHandler(parsedData);
}else if(options.previewParserPath!==''){
$.ajax({
type:options.previewParserAjaxType,
dataType:'text',
global:false,
url:options.previewParserPath,
data:options.previewParserVar+'='+encodeURIComponent(parsedData),
success:function(data){
writeInPreview(localize(data,1));
}
});
}else{
if(!template){
$.ajax({
url:options.previewTemplatePath,
dataType:'text',
global:false,
success:function(data){
writeInPreview(localize(data,1).replace(/<!-- content -->/g,parsedData));
}
});
}
}
return false;
}
function writeInPreview(data){
if(options.previewInElement){
$(options.previewInElement).html(data);
}else if(previewWindow&&previewWindow.document){
try{
sp=previewWindow.document.documentElement.scrollTop
}catch(e){
sp=0;
}
previewWindow.document.open();
previewWindow.document.write(data);
previewWindow.document.close();
previewWindow.document.documentElement.scrollTop=sp;
}
}
function keyPressed(e){
shiftKey=e.shiftKey;
altKey=e.altKey;
ctrlKey=(!(e.altKey&&e.ctrlKey))?(e.ctrlKey||e.metaKey):false;
if(e.type==='keydown'){
if(ctrlKey===true){
li=$('a[accesskey="'+((e.keyCode==13)?'\\n':String.fromCharCode(e.keyCode))+'"]',header).parent('li');
if(li.length!==0){
ctrlKey=false;
setTimeout(function(){
li.triggerHandler('mouseup');
},1);
return false;
}
}
if(!browser.opera){
if(e.keyCode===13||e.keyCode===10){
if(ctrlKey===true){
ctrlKey=false;
markup(options.onCtrlEnter);
if(!options.onCtrlEnter.keepDefault){
textarea.dispatchEvent(new Event('input'));
}
return options.onCtrlEnter.keepDefault;
}else if(shiftKey===true){
shiftKey=false;
markup(options.onShiftEnter);
if(!options.onShiftEnter.keepDefault){
textarea.dispatchEvent(new Event('input'));
}
return options.onShiftEnter.keepDefault;
}else{
markup(options.onEnter);
if(!options.onEnter.keepDefault){
textarea.dispatchEvent(new Event('input'));
}
return options.onEnter.keepDefault;
}
}
if(e.keyCode===9){
if(shiftKey==true||ctrlKey==true||altKey==true){
return false;
}
if(caretOffset!==-1){
get();
caretOffset=$$.val().length-caretOffset;
set(caretOffset,0);
caretOffset=-1;
return false;
}else{
markup(options.onTab);
return options.onTab.keepDefault;
}
}
}
}
}
function remove(){
$$.off(".markItUp").removeClass('markItUpEditor');
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$);
var relativeRef=$$.parent('div').parent('div.markItUp').parent('div');
if(relativeRef.length){
relativeRef.replaceWith($$);
}
$$.data('markItUp',null);
}
init();
});
};
$.fn.markItUpRemove=function(){
return this.each(function(){
$(this).markItUp('remove');
}
);
};
$.markItUp=function(settings){
var options={target:false};
$.extend(options,settings);
if(options.target){
return $(options.target).each(function(){
$(this).focus();
$(this).trigger('insertion',[options]);
});
}else{
$('textarea').trigger('insertion',[options]);
}
};
})(jQuery);
/* plugins-dist/porte_plume/javascript/jquery.previsu_spip.js?1749555110 */
;(function($){
$.fn.previsu_spip=function(settings){
var options;
options={
previewParserPath:'',
previewParserVar:'data',
textEditer:'Editer',
textVoir:'Voir',
textFullScreen:'Plein écran'
};
$.extend(options,settings);
return this.each(function(){
var $$,textarea,tabs,preview;
$$=$(this);
textarea=this;
function init(){
$$.addClass("pp_previsualisation");
if(!$$.parent().has('.markItUpContainer').length){
$$.barre_outils('vide');
}
var mark=$$.parent();
tabs=$('<div class="markItUpTabs"></div>').prependTo(mark);
$(tabs).append(
'<a href="#fullscreen" class="fullscreen">'+options.textFullScreen+'</a>'+
'<a href="#previsuVoir" class="previsuVoir">'+options.textVoir+'</a>'+
'<a href="#previsuEditer" class="previsuEditer on">'+options.textEditer+'</a>'
);
preview=$('<div class="markItUpPreview"></div>').insertAfter(mark.find('.markItUpHeader'));
preview.hide();
var is_full_screen=false;
var objet=mark.parents('.formulaire_spip')[0].className.match(/formulaire_editer_(\w+)/);
objet=(objet?objet[1]:'');
var champ=mark.parents('.editer')[0].className.match(/editer_(\w+)/);
champ=(champ?champ[1].toUpperCase():'');
var textarea=mark.find('textarea.pp_previsualisation');
var preview=mark.find('.markItUpPreview');
var dir=textarea.attr('dir');
if(dir){
preview.attr('dir',dir);
}
tabs.find('.fullscreen').click(function(){
if(!mark.is('.fullscreen')){
textarea.data('height-origin',textarea.css('height'));
}
mark.toggleClass('fullscreen');
if(mark.is('.fullscreen')){
$('body').addClass('markitup-fullscreen');
is_full_screen=true;
mark.find('.markItUpHeader a').show();
if(!mark.is('.livepreview')){
var original_texte="";
function refresh_preview(){
var texte=textarea.val();
if(original_texte==texte){
return;
}
renderPreview(preview.addClass('ajaxLoad'),texte,champ,objet);
original_texte=texte;
}
var timerPreview=null;
mark.addClass('livepreview').find('.markItUpEditor').on('keyup click change focus refreshpreview',function(e){
if(is_full_screen){
if(timerPreview)clearTimeout(timerPreview);
timerPreview=setTimeout(refresh_preview,500);
}
});
$(window).on('keyup',function(e){
if(is_full_screen){
if(e.type=='keyup'&&e.keyCode==27&&!markitup_prompt){
mark.removeClass('fullscreen');
$('body').removeClass('markitup-fullscreen');
textarea.css('height',textarea.data('height-origin'));
is_full_screen=false;
}
}
});
}
mark.find('.markItUpEditor').trigger('refreshpreview');
}
else{
$('body').removeClass('markitup-fullscreen');
textarea.css('height',textarea.data('height-origin'));
if($(this).next().hasClass('on')){
mark.find('.markItUpHeader a').hide();
}
is_full_screen=false;
}
return false;
});
tabs.find('.previsuVoir').click(function(){
preview.height(
mark.find('.markItUpEditor').height()
+mark.find('.markItUpFooter').height()
);
mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').hide();
$(this).addClass('on').next().removeClass('on');
renderPreview(
preview.show().addClass('ajaxLoad'),
mark.find('textarea.pp_previsualisation').val(),
champ,
objet,
false
);
return false;
});
tabs.find('.previsuEditer').click(function(){
mark.find('.markItUpPreview').hide();
mark.find('.markItUpHeader a,.markItUpEditor,.markItUpFooter').show();
$(this).addClass('on').prev().removeClass('on');
return false;
});
}
function renderPreview(node,val,champ,objet,async){
if(options.previewParserPath!==''){
$.ajax({
type:'POST',
async:typeof(async)=="undefined"?true:async,
url:options.previewParserPath,
data:'champ='+champ
+'&objet='+objet
+'&'+options.previewParserVar+'='+encodeURIComponent(val),
success:function(data){
node.html(data).removeClass('ajaxLoad');
$("a",node).attr("target","blank");
$(":input",node).attr("disabled","disabled");
}
});
}
}
init();
});
};
})(jQuery);
/* local/cache-js/jsdyn-javascript_porte_plume_start_js-21eb9f36.js?1756489818 */
barre_outils_edition={
"nameSpace":"edition",
"previewAutoRefresh":false,
"onEnter":{
"keepDefault":false,
"selectionType":"return",
"replaceWith":"\n"
},
"onShiftEnter":{
"keepDefault":false,
"replaceWith":"\n_ "
},
"onCtrlEnter":{
"keepDefault":false,
"replaceWith":"\n\n"
},
"markupSet":[
{
"name":"Transformer en {{{intertitre}}}",
"key":"H",
"className":"outil_header1",
"openWith":"\n{{{",
"closeWith":"}}}\n",
"selectionType":"line"
},
{
"name":"Mettre en {{gras}}",
"key":"B",
"className":"outil_bold",
"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');},
"selectionType":"word"
},
{
"name":"Mettre en {italique}",
"key":"I",
"className":"outil_italic",
"replaceWith":function(h){return espace_si_accolade(h,'{','}');},
"selectionType":"word"
},
{
"name":"Mettre en liste",
"className":"outil_liste_ul separateur_avant",
"replaceWith":function(h){return outil_liste(h,'*');},
"selectionType":"line",
"forceMultiline":true,
"dropMenu":[
{
"id":"liste_ol",
"name":"Mettre en liste num\u00e9rot\u00e9e",
"className":"outil_liste_ol",
"replaceWith":function(h){return outil_liste(h,'#');},
"display":true,
"selectionType":"line",
"forceMultiline":true
},
{
"id":"desindenter",
"name":"D\u00e9sindenter une liste",
"className":"outil_desindenter",
"replaceWith":function(h){return outil_desindenter(h);},
"display":true,
"selectionType":"line",
"forceMultiline":true
},
{
"id":"indenter",
"name":"Indenter une liste",
"className":"outil_indenter",
"replaceWith":function(h){return outil_indenter(h);},
"display":true,
"selectionType":"line",
"forceMultiline":true
}
]
},
{
"name":"Transformer en [lien hypertexte->http:\/\/...]",
"key":"L",
"className":"outil_link separateur separateur_apres sepLink",
"openWith":"[",
"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]"
},
{
"name":"Transformer en [[Note de bas de page]]",
"className":"outil_notes separateur_avant",
"openWith":"[[",
"closeWith":"]]",
"selectionType":"word"
},
{
"name":"<quote>Citer un message<\/quote>",
"key":"Q",
"className":"outil_quote separateur separateur_apres sepGuillemets",
"openWith":"\n<quote>",
"closeWith":"<\/quote>\n",
"selectionType":"word",
"dropMenu":[
{
"id":"barre_poesie",
"name":"Mettre en forme comme une <poesie>po\u00e9sie<\/poesie>",
"className":"outil_poesie",
"openWith":"\n<poesie>",
"closeWith":"<\/poesie>\n",
"display":true,
"selectionType":"line"
}
]
},
{
"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
"className":"outil_guillemets",
"openWith":"«",
"closeWith":"»",
"lang":[
"fr",
"eo",
"cpf",
"ar",
"es"
],
"selectionType":"word",
"dropMenu":[
{
"id":"guillemets_simples",
"name":"Entourer de \u201cguillemets de second niveau\u201d",
"className":"outil_guillemets_simples",
"openWith":"“",
"closeWith":"”",
"display":true,
"lang":[
"fr",
"eo",
"cpf",
"ar",
"es"
],
"selectionType":"word"
}
]
},
{
"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
"className":"outil_guillemets_de",
"openWith":"„",
"closeWith":"“",
"lang":[
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word",
"dropMenu":[
{
"id":"guillemets_de_simples",
"name":"Entourer de \u201cguillemets de second niveau\u201d",
"className":"outil_guillemets_de_simples",
"openWith":"‚",
"closeWith":"‘",
"display":true,
"lang":[
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word"
}
]
},
{
"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
"className":"outil_guillemets_simples separateur_avant",
"openWith":"“",
"closeWith":"”",
"lang_not":[
"fr",
"eo",
"cpf",
"ar",
"es",
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word",
"dropMenu":[
{
"id":"guillemets_autres_simples",
"name":"Entourer de \u201cguillemets de second niveau\u201d",
"className":"outil_guillemets_uniques",
"openWith":"‘",
"closeWith":"’",
"display":true,
"lang_not":[
"fr",
"eo",
"cpf",
"ar",
"es",
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word"
}
]
},
{
"name":"Ins\u00e9rer des caract\u00e8res sp\u00e9cifiques",
"className":"outil_caracteres separateur separateur_apres sepCaracteres separateur_avant",
"dropMenu":[
{
"id":"A_grave",
"name":"Ins\u00e9rer un \u00c0",
"className":"outil_a_maj_grave",
"replaceWith":"À",
"display":true,
"lang":[
"fr",
"eo",
"cpf"
]
},
{
"id":"E_aigu",
"name":"Ins\u00e9rer un \u00c9",
"className":"outil_e_maj_aigu",
"replaceWith":"É",
"display":true,
"lang":[
"fr",
"eo",
"cpf"
]
},
{
"id":"E_grave",
"name":"Ins\u00e9rer un \u00c8",
"className":"outil_e_maj_grave",
"replaceWith":"È",
"display":true,
"lang":[
"fr",
"eo",
"cpf"
]
},
{
"id":"aelig",
"name":"Ins\u00e9rer un \u00e6",
"className":"outil_aelig",
"replaceWith":"æ",
"display":true,
"lang":[
"fr",
"eo",
"cpf"
]
},
{
"id":"AElig",
"name":"Ins\u00e9rer un \u00c6",
"className":"outil_aelig_maj",
"replaceWith":"Æ",
"display":true,
"lang":[
"fr",
"eo",
"cpf"
]
},
{
"id":"oe",
"name":"Ins\u00e9rer un \u0153",
"className":"outil_oe",
"replaceWith":"œ",
"display":true,
"lang":[
"fr"
]
},
{
"id":"OE",
"name":"Ins\u00e9rer un \u0152",
"className":"outil_oe_maj",
"replaceWith":"Œ",
"display":true,
"lang":[
"fr"
]
},
{
"id":"Ccedil",
"name":"Ins\u00e9rer un \u00c7",
"className":"outil_ccedil_maj",
"replaceWith":"Ç",
"display":true,
"lang":[
"fr",
"eo",
"cpf"
]
},
{
"id":"uppercase",
"name":"Passer en majuscules",
"className":"outil_uppercase",
"replaceWith":function(markitup){return markitup.selection.toUpperCase()},
"display":true,
"lang":[
"fr",
"en"
]
},
{
"id":"lowercase",
"name":"Passer en minuscules",
"className":"outil_lowercase",
"replaceWith":function(markitup){return markitup.selection.toLowerCase()},
"display":true,
"lang":[
"fr",
"en"
]
}
]
},
{
"name":"Ins\u00e9rer un code informatique (`)",
"className":"outil_code separateur separateur_apres sepCode",
"openWith":"`",
"closeWith":"`",
"dropMenu":[
{
"id":"cadre",
"name":"Ins\u00e9rer un code pr\u00e9format\u00e9 (```)",
"className":"outil_cadre",
"openWith":"```\n",
"closeWith":"\n```",
"display":true
}
]
}
]
}
function outil_liste(h,c){
if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){
r[1]=r[1].replace(/[#*]/g,c);
s='-'+r[1]+' '+r[2];
}else{
s='-'+c+' '+s;
}
return s;
}
function outil_indenter(h){
if(s=h.selection){
if(s.substr(0,2)=='-*'){
s='-**'+s.substr(2);
}else if(s.substr(0,2)=='-#'){
s='-##'+s.substr(2);
}else{
s='-* '+s;
}
}
return s;
}
function outil_desindenter(h){
if(s=h.selection){
if(s.substr(0,3)=='-**'){
s='-*'+s.substr(3);
}else if(s.substr(0,3)=='-* '){
s=s.substr(3);
}else if(s.substr(0,3)=='-##'){
s='-#'+s.substr(3);
}else if(s.substr(0,3)=='-# '){
s=s.substr(3);
}
}
return s;
}
function espace_si_accolade(h,openWith,closeWith){
if(s=h.selection){
if(s.charAt(0)=='{'){
return openWith+' '+s+' '+closeWith;
}
else if(c=h.textarea.selectionStart){
if(h.textarea.value.charAt(c-1)=='{'){
return' '+openWith+s+closeWith+' ';
}
}
}
return openWith+s+closeWith;
}
barre_outils_forum={
"nameSpace":"forum",
"previewAutoRefresh":false,
"onEnter":{
"keepDefault":false,
"selectionType":"return",
"replaceWith":"\n"
},
"onShiftEnter":{
"keepDefault":false,
"replaceWith":"\n_ "
},
"onCtrlEnter":{
"keepDefault":false,
"replaceWith":"\n\n"
},
"markupSet":[
{
"name":"Mettre en {{gras}}",
"key":"B",
"className":"outil_bold",
"replaceWith":function(h){return espace_si_accolade(h,'{{','}}');},
"selectionType":"word"
},
{
"name":"Mettre en {italique}",
"key":"I",
"className":"outil_italic separateur_avant",
"replaceWith":function(h){return espace_si_accolade(h,'{','}');},
"selectionType":"word"
},
{
"name":"Transformer en [lien hypertexte->http:\/\/...]",
"key":"L",
"className":"outil_link separateur separateur_apres sepLink separateur_avant",
"openWith":"[",
"closeWith":"->[![Veuillez indiquer l\u2019adresse de votre lien (vous pouvez indiquer une adresse Internet sous la forme http:\/\/www.monsite.com, une adresse courriel, ou simplement indiquer le num\u00e9ro d\u2019un article de ce site.]!]]"
},
{
"name":"<quote>Citer un message<\/quote>",
"key":"Q",
"className":"outil_quote separateur separateur_apres sepGuillemets",
"openWith":"\n<quote>",
"closeWith":"<\/quote>\n",
"selectionType":"word"
},
{
"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
"className":"outil_guillemets",
"openWith":"«",
"closeWith":"»",
"lang":[
"fr",
"eo",
"cpf",
"ar",
"es"
],
"selectionType":"word",
"dropMenu":[
{
"id":"guillemets_simples",
"name":"Entourer de \u201cguillemets de second niveau\u201d",
"className":"outil_guillemets_simples",
"openWith":"“",
"closeWith":"”",
"display":true,
"lang":[
"fr",
"eo",
"cpf",
"ar",
"es"
],
"selectionType":"word"
}
]
},
{
"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
"className":"outil_guillemets_de",
"openWith":"„",
"closeWith":"“",
"lang":[
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word",
"dropMenu":[
{
"id":"guillemets_de_simples",
"name":"Entourer de \u201cguillemets de second niveau\u201d",
"className":"outil_guillemets_de_simples",
"openWith":"‚",
"closeWith":"‘",
"display":true,
"lang":[
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word"
}
]
},
{
"name":"Entourer de \u00ab\u00a0guillemets\u00a0\u00bb",
"className":"outil_guillemets_simples separateur_avant",
"openWith":"“",
"closeWith":"”",
"lang_not":[
"fr",
"eo",
"cpf",
"ar",
"es",
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word",
"dropMenu":[
{
"id":"guillemets_autres_simples",
"name":"Entourer de \u201cguillemets de second niveau\u201d",
"className":"outil_guillemets_uniques",
"openWith":"‘",
"closeWith":"’",
"display":true,
"lang_not":[
"fr",
"eo",
"cpf",
"ar",
"es",
"bg",
"de",
"pl",
"hr",
"src"
],
"selectionType":"word"
}
]
}
]
}
function outil_liste(h,c){
if((s=h.selection)&&(r=s.match(/^-([*#]+) (.*)$/))){
r[1]=r[1].replace(/[#*]/g,c);
s='-'+r[1]+' '+r[2];
}else{
s='-'+c+' '+s;
}
return s;
}
function outil_indenter(h){
if(s=h.selection){
if(s.substr(0,2)=='-*'){
s='-**'+s.substr(2);
}else if(s.substr(0,2)=='-#'){
s='-##'+s.substr(2);
}else{
s='-* '+s;
}
}
return s;
}
function outil_desindenter(h){
if(s=h.selection){
if(s.substr(0,3)=='-**'){
s='-*'+s.substr(3);
}else if(s.substr(0,3)=='-* '){
s=s.substr(3);
}else if(s.substr(0,3)=='-##'){
s='-#'+s.substr(3);
}else if(s.substr(0,3)=='-# '){
s=s.substr(3);
}
}
return s;
}
function espace_si_accolade(h,openWith,closeWith){
if(s=h.selection){
if(s.charAt(0)=='{'){
return openWith+' '+s+' '+closeWith;
}
else if(c=h.textarea.selectionStart){
if(h.textarea.value.charAt(c-1)=='{'){
return' '+openWith+s+closeWith+' ';
}
}
}
return openWith+s+closeWith;
}
barre_outils_vide={
"nameSpace":"vide",
"previewAutoRefresh":false,
"markupSet":[]
}
;(function($){
$.fn.barre_outils=function(nom,settings){
options={
lang:'fr'
};
$.extend(options,settings);
return $(this)
.not('.markItUpEditor, .no_barre')
.markItUp(eval('barre_outils_'+nom),{lang:options.lang})
.trigger('markItUpEditor.loaded')
.parent().find('.markItUpButton a').attr('tabindex',-1)
.end();
};
$.fn.barre_previsualisation=function(settings){
options={
previewParserPath:"index.php?action=porte_plume_previsu",
textEditer:"Modifier",
textVoir:"Voir"
};
$.extend(options,settings);
return $(this)
.not('.pp_previsualisation, .no_previsualisation')
.previsu_spip(options)
.trigger('markItUpPreview.loaded')
.parent().find('.markItUpTabs a').attr('tabindex',-1)
.end();
};
$(window).on('load',function(){
function barrebouilles(){
$('.formulaire_spip textarea.inserer_barre_forum').barre_outils('forum');
$('.formulaire_spip textarea.inserer_barre_edition').barre_outils('edition');
$('.formulaire_spip textarea.inserer_previsualisation').barre_previsualisation();
$('textarea.textarea_forum').barre_outils('forum');
$('.formulaire_forum textarea[name=texte]').barre_outils('forum');
$('.formulaire_spip textarea[name=texte]')
.barre_outils('edition').end()
.barre_previsualisation();
}
barrebouilles();
onAjaxLoad(barrebouilles);
});
})(jQuery);
/* prive/javascript/js.cookie.js?1749554704 */
;
(function(global,factory){
typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():
typeof define==='function'&&define.amd?define(factory):
(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){
var current=global.Cookies;
var exports=global.Cookies=factory();
exports.noConflict=function(){global.Cookies=current;return exports;};
})());
})(this,(function(){'use strict';
function assign(target){
for(var i=1;i<arguments.length;i++){
var source=arguments[i];
for(var key in source){
target[key]=source[key];
}
}
return target
}
var defaultConverter={
read:function(value){
if(value[0]==='"'){
value=value.slice(1,-1);
}
return value.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)
},
write:function(value){
return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
decodeURIComponent
)
}
};
function init(converter,defaultAttributes){
function set(name,value,attributes){
if(typeof document==='undefined'){
return
}
attributes=assign({},defaultAttributes,attributes);
if(typeof attributes.expires==='number'){
attributes.expires=new Date(Date.now()+attributes.expires*864e5);
}
if(attributes.expires){
attributes.expires=attributes.expires.toUTCString();
}
name=encodeURIComponent(name)
.replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent)
.replace(/[()]/g,escape);
var stringifiedAttributes='';
for(var attributeName in attributes){
if(!attributes[attributeName]){
continue
}
stringifiedAttributes+='; '+attributeName;
if(attributes[attributeName]===true){
continue
}
stringifiedAttributes+='='+attributes[attributeName].split(';')[0];
}
return(document.cookie=
name+'='+converter.write(value,name)+stringifiedAttributes)
}
function get(name){
if(typeof document==='undefined'||(arguments.length&&!name)){
return
}
var cookies=document.cookie?document.cookie.split('; '):[];
var jar={};
for(var i=0;i<cookies.length;i++){
var parts=cookies[i].split('=');
var value=parts.slice(1).join('=');
try{
var found=decodeURIComponent(parts[0]);
jar[found]=converter.read(value,found);
if(name===found){
break
}
}catch(e){}
}
return name?jar[name]:jar
}
return Object.create(
{
set,
get,
remove:function(name,attributes){
set(
name,
'',
assign({},attributes,{
expires:-1
})
);
},
withAttributes:function(attributes){
return init(this.converter,assign({},this.attributes,attributes))
},
withConverter:function(converter){
return init(assign({},this.converter,converter),this.attributes)
}
},
{
attributes:{value:Object.freeze(defaultAttributes)},
converter:{value:Object.freeze(converter)}
}
)
}
var api=init(defaultConverter,{path:'/'});
return api;
}));
/* local/cache-js/jsdyn-socialtags_js-35c7c9ea.js?1756489818 */
;var socialtags_addfavorite=function(u,t){
if(document.all)window.external.AddFavorite(u,t);
};
(function($){
var socialtags_init=function(){
var selector=$('#socialtags-article');
if(!selector.length)return;
var socialtags=[
{a:'bookmark',n:'Ajouter aux favoris',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAA3lBMVEX////qyz3kvDPYnh/cpiTYnh/qyz3qyz3cpiTKegjqyz3frSrRixPjtzDoxTncpiTYnh/qyz3jtzDfrSrcpiTYnh/qyz3gsSzVlhrqyz3oxTnkvDPgsSzfrSroxTnkvDPgsSzfrSrcpiTXmRzSjhXPhhDOhAjdoincpiTlrTjirzLosCXpsxvpsyDqtSvltjjkvDPouT/ruUPsvCLovj3rvUTsv0jtwjDuw0HvxSnqxUPuw0vvyE/wyznxzS/tzknxzlPy0EXv1Uz01kDy1lXy1Vj02Vry3Ff13l324WK2sKlgAAAAJnRSTlMAERERIiIzVVVVZmZmd4iIiKqqqqqqzMzM3d3d3d3u7u7u7u7u7j8sRXMAAACoSURBVBgZVcHZGoFAAAbQ35o1+07ITmNkhCGNUPL+L8RnXOgc/CQVhLU0hChCqPinPbwN/qjC905lfEUypbYmfPdy3Q26lWwc9dszCAKX84N9tsylDrRvr7vjcMYIsZZ6DEBHBA7njBj7hR7DR7TvuZwxg1jzBL7yJ48zYlBag1QW4nA8rle0CalhX22TWls6htSz6bxaHM0WE0hDvYCP3GQKKYWfNIA3uSYXdOl/HLcAAAAASUVORK5CYII=',w:16,h:16,u:'javascript:socialtags_addfavorite(\'%u\',\'%t\');',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'mail',n:'Partage par email (mailto)',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAZCAYAAAArK+5dAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wsVCh8ltGLN6QAAAYVJREFUSMftlD9PwkAYxh+JSWXRxKSXWKlLYepNpQzGYAhL04kJvIGEGUb8FibwFYSwsBFcCAxKQpRFmHDDSeOgSQldpJNO/KmhQBHjwm+6y909z5vn3jtgy3+zc3mV+/pLg93xgPolHBGyEdGRZaHV6doN+i+voAE/VCr/Svzt/QPXlepk7gEASfQhHFRQrtVRrtXXFm91usgXS5BORAiEnxoAgHZ2igtdw2PvCfliCQPTdBVJoVJF9baJcFAB0zV4Oc5uAAAhKiObSsIYmsgVSuj1n1eKZLyX6Rpi0Yht3fPzgEAIMiyOw4P9SVXLIvm0LGRTybn355l3UCAEaZaAJPomIrORzUYiEB4ZFofg0IEep+q8HIc0S0Clsi2G2bEk+pBmCUdxW5s6wXQNAs/j5q6Jwkz7qVQG07XVH9oizlUF3j0O1dsmRpaFWDSCcFBx95KXEaIyjgkPY2iCBvzuv4pVEAhZmLerS97oZ2cMTTQe2hsVNobm1GBgmmjct7Fly1p8Ayn5j6hOrHkiAAAAAElFTkSuQmCC',w:24,h:25,u:'mailto:?subject=%t&body=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'bebo',n:'Bebo',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABZUlEQVR42n2ST07CQBTGX8IBJHoBEi5gPABW9gZ1z594Al1r/LOVgnFpjBqXdqM30BvoAZrACk0gQWHelHaK9RumVkDs5DXTmff9vjfzWvIDFShEqFQY9HqjRtMrbcv1DRNYBq6rTFYpiAmTXochcpxdZsr8jdHRMQSGIeMtqzWdsIoLAQQEEyAkTNqbMv7efhRFwcnpf4yHOgD8btecBNJ0QJu6Lo2ub8wiAUwpM776fXV7J3P5uEijSbJSTQESzDDoG+GZA2b6s7UDNfZRJwa4YKUAhtFFWm29LFjE5co0ED48pgGbJeLLq/hCq2vmxH5t97f9ufz45TUxEmc2CZZiKf7A46fnaNHANWCnZZ03EoL53on9sivq/GJe3WpDrQV1G+40GAKRfHA4c26raAIW8Wa5AhnEP4D02HGSs02HwH9QtyGYAEwfn8PBQAwFa4w99ECgb+h1wdIvaEnnHSkIYA3xN4jO4ZjjwIRUAAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.bebo.com/c/share?Url=%u&Title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'blogmarks',n:'Blogmarks',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEUAAABTU1N+4w8U8X4qAAAAAXRSTlMAQObYZgAAADNJREFUCB0FwQEVgCAQQLHdz0AfiUY0Y5DG59ZssshsscTsZpNF5nljiU4QxHfiynfk8gPBSQejXWFFnAAAAABJRU5ErkJggg==',w:16,h:16,u:'http://blogmarks.net/my/new.php?mini=1&url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'digg',n:'Digg',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABIklEQVR42nWRXYqEMBCEvf8NvMEeRlAEf0D0QfDBB8WNJhodma2kNBsHpmi06XwVKzHQ+7EfqNeBen0puwoMcIAXUavzqvP8eSoMQ3oC7h3eAsoC9PaEpbquAQekOdVaoz+taJBSDsPQdR0NgAOfnqapbVtMGAND0k3TuOFlcHRRFDbuQQPpPM8xLMsSz8vg6DiOMWG2Dz0Mjo6iCBOlVHOr9GQMSq0fO/kH6PseqbAdj3EZ1k0zw36LBp+uqooXFUhj2DZr0PuuDf9/YkczjzEsEt/YXB7fQBo96CzLbsMi3a/gH9V3JO6NHnSappdBzAs6hBJCjONoeq1pYBL0oJMkeRh84Q7CLzKG6XcWYpkXicNIueIOUMoWewyxBABbA/4DW1d+NFdGHIAAAAAASUVORK5CYII=',w:16,h:16,u:'http://digg.com/submit?phase=2&url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'diigo',n:'Diigo',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAzUlEQVR42nWRCw7CIBBEuf8NvJb3MFH+LDR1FgiZFjXPlDLz2iU1RapU0Cpof+gpaigbXMzjHLR2TI5OX690OBDa2nq+zlklONVyvQrH9uNUy3gLpsTNYBfwkpXOkdTg0Xd6ipaOJPLr0MR2aBJ2h6M5UoyJt7gBRIRTLd8ENNYRB3chXIUCA99e6lpwqmUf4i6wdhFQ9j5chCIoMZzq063zvJVLucGplvGHt46YcgG5kyZ5pdYF8/44a73zAVoICccCsTPW2ESEAh6N8heOx4YJc8I4LAAAAABJRU5ErkJggg==',w:16,h:16,u:'http://secure.diigo.com/post?url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'facebook',n:'Facebook',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAAAV0lEQVR42mNgIAMkVq6xjpxBEAGVQTUQoxqCCGhIqFj9+t2X/2BAlAa4amI1ICultob/GICABqDr4R6AsAfcDwQ0uCbNy23ZgokgGuBcoDJyNZCc+EgCALf2LCgEnyVyAAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.facebook.com/sharer/sharer.php?u=%u&t=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'friendfeed',n:'FriendFeed',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC90lEQVQ4y22Ny2ucZRjFf9/3vXPLZJKJmSRNp6UabRVb8JJQUFAQcSW6cO+idCXu/Uvcqv+CIG7FhWjBJMUELNMmNEmbzCQzmUzm8t3e93kfF5OlBw6cA+cSqCq7B8PS5rPLh4dn8YYSBKqKV/Be8V6RKy1TanOx/Pf6G/M/fvbeUmas08qj1uCXa4vVT++9voACURhAEICCV1AFUJSp3m+PHzxqDb76+N7il8HPf7W/DU3h+zdv1sjFA7B/MuakF6MKS/Uy1nk6/YQwDGg2qrx1a56tVp/Q22/M1t7l/S8+bJK5afn3xx2OzhKWF2YgCGjtdAnDkEa9Qu4820+PMSZk7XqVH37d3zCq6q14yqq0+wnP2xPu313FOuFimNFcrnFjeZbLcU6cOUwUMJxkzFcNTiQwznms84xixx87Z5RLEQUTsrvXZe/lgLfXGiiw3TqlN0io10osL5RJc484r8Y6QUTpDib0Binv3FlhHOc0l2s06jOUihFxarm71uDl2YjhKKFYiOgPM8ZJTphbIc2FAMgyR7s7QrzS6Y15enjOaT8mToXdvR7/POuRWU+SOdJcyHI3HYgzx+xMgVdXq3TOJ6TWc9gest3qctQZM0kdz48H3G7O8sn6NeLUYa1HxQcmzx1pJpgoILNC+zzhxjDncmJx1iHicU5AlVurVYqFkDRz5FbwIpiD9oj+KEOAy3FOmlqsE9QL6j0ignXTcJJOz7z30wEvgUkzR2aF3F4FvcerIqJYe+W9IuLJrSO3Dq9K7gQRHxjvNXLOk1lHqRBxfjHhz80DJnHOK3MlDl70Oe2OSJIcE4VkVlAF6zzeCaaS7m2e9Jpf364YmiuzfPT+dSaJpVopsNKY4bgzJrNCvdZgbrZIboViIeKkm1JK9zejjXfv7B72wg+0WH+taKBaKVCfK1EuG5zz1KpF5udKFIsRaeawVjjqpDzZ3fltUf79zkQh8WL++PMnWxcPtszN9YAgIlD+FxqgqMy4F1tL4cFPUUj6H2qYAExoz3sEAAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.friendfeed.com/share?title=%t&link=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'google',n:'Google bookmarks',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAB+ElEQVR42pXS22vTUBwH8P1LUfogKCqK6IMdjM0xK8PLUx9WQQX7IHTqplBh4IU4hTEvaOdwzLoyL2v2IJINjBinTkM1totbNhuX206SJjnnt7RLdCIO/ZKnc36fc8nvNNH0PP2B/vevKQCW42BCMMYABABMi3wsm9wndfarqWj+2iAhRNWW5+kGCKqhEcOFayNzzacmW05PtKaf7+56tivFpq5UCmzV9cCyVkLg+8EyIFahI83sPdzPTJeR7Xo+kb6b2dsc1f6A2tkz9aaCPTsEANh04dhFfmtLr7SgwO9JZkaydN7HBCH9JyBjnEvF6YEcA3/E9aIDG1oIXJ9k7six5uyXsgx/j6FHoKrjzgvCjo4+TUcbAF2LgChbe0683dLWJ84tbQjUEMiKvT8tbDpwK1fg11d8lr37jFLkrcfs8tCTWeWHEoKgaSdpafOh8XjynmY4a9XBTW8WFs8NCsfpEtWW67k67ljmr7/EvtdjRyapRL7r0jSqkfX7PGRtKj4w8WKG+FEfPM8LJm6MClT7MNU6nMhwRU5XdHAxKAacHyxR286OFXniW1Gn66+oHmZKTHY/2t55PZa4uy/1NJF5ebCbPXom33t5VJK1mo1CoGoqqmeFYMe2TLFceT0jvOJL3DtRWlhEyCDErTlIlr81wP+87QCsAnW5ZGMUWDV8AAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.google.com/bookmarks/mark?op=edit&bkmk=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'linkedin',n:'LinkedIn',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kHEhctOk6akusAAAIiSURBVDjLpZO9axRBGMZ/s7t3bhI3dyTmJGlO/MphE0nATgsbxUZrkQi2FhaCra1/g2IhBCF/gUVAQVujJAqJChpBYw7jZTZ7m83uzOxY7JrkYrDxhYd33pd5nnk/GHF7Zm7y6cLPR8bxJgX7zAIKMIAuoQrvGM31KyNTIrg3a69enODk0drfZF2SzR4RA7m2fPiywbO59zgCOD4yCIDvOtSr7j/JGHBywenROmiNB+A4RfF3zhzBdx2eLHdYkdmB5D+xa+2ugMotvivwXQcAD4HK7MEVaMCYEgrPAmFmCC08eNNmuOKxuJb0Dm4vWeuCrDVoVVQgU0PTr3LtWA0sWAXNoEqzVuFrR7G0us35EwMMVAQvl0JevftVCmg8cghjQ+5ZWkM+AG+/J4wFHq2Gz3jD51Ir2FlOa6yPrSjh+es2VmkcNMjY0E3ynUvbaY7WxTnezrn18DMX7i+ytpEBMD7Wj5QJGFUIhF1D3CNgMcYCsLyaMP9JEoYJ39YTAEYGK4QyLmegIYwM3f5dgTTN0boQ0CYnlFugFFqZIqcNYScGwOE/zUOD3DR0D5ueFrTOd16TMoE0282pHBkV8xDBzVkbNU5Rc1zONvpAwcqPmHolp161yDBhYWkdsoyJZj91XyCjjIWPHQLRRgQ3Zm0UDcHoMKRAlpVIC5/ui/dYINp405eHph6/ODSvlMB01hlMV8v9bWK7m70N7/vv03fPTf0GFBI+IEBE4vMAAAAASUVORK5CYII=',w:16,h:16,u:'http://www.linkedin.com/shareArticle?mini=true&url=%u&title=%t&source=%u_site&summary=%d',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'live',n:'Live',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAACfElEQVR42pWSO0yTURzF///73X6vlpY+oIVWEBKUEFFIiCTEVdHE6Mji6ObkYuIIs4kxbjg6EB1MNDFOPgJKmCSiyEOopW0ojz7o1379nvdehxInF89yznByzvJDIQT8j+ipc745kTqptIgmaJBgAKJhNT85eGV2GQlBQABoT9N2u3g1ZVotNc47emS1k0iKsJvidVlZ+XDLKPtzM+8AYPrBeU3TTx8E85UoiZwJqEkpkEJ0eLnVGxvuQ7pmE3Z3fmK/7GaBRX2JAgAI4RPUE0Q/S2gUiCqah6oxci45GDEhEY9WXdJAG1UM4A6nIPjhdLdCPD3mcz/gV9ADlVFk6Yuo7NlNPawij/g1w7G4Uv5tUwCQBFuV4z+USan38hDYQ0dLHfRYHxjMZVfH05mDRjGASiTk1GpyrtCgAvD28KPvwYyWyFyIR7qiyujUvTv9/lFx3mVis3zMuVt32IkveF3RpRDlAve6RxpyOBHRUiHMhHB5tzolZ6/vPh3vmlyLXCqZFqnt02I1sOe9WV+kNx8v2Y4AbhmeXLNZ0PRcxx/TsqjFUv5xsvCCIbE0VAZac/lRiRBKJKw3bAiSisNyLb9luWOZcLj6CWQF+sfQL1FzvYMdlHKprbIuAIjlIXMZeAANa8OC7RYmvTypfoUggrsDzV/gGnDgr5WSLxeeE0LofqmgbnzsZJW+dI/ZO5qNTYSNFYjVQQOoH4FlQcOFFvm8Ta+1WbJWXhlLC4QQBBAAM/efpGOLImpAvYk2gMlF0zHdrvffKrMCEAEZY4SQvzByLgD4s4c30qGjHrXiWWLrUH77k37ZsvKFnCRJ+E+8hRAAAtsZAAQIgPbuH5DSOdFbicnkAAAAAElFTkSuQmCC',w:16,h:16,u:'https://favorites.live.com/quickadd.aspx?marklet=1&add=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'myspace',n:'MySpace',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAe1BMVEX1/P3////09PTk6vipt+fU2euIk8oCMI8wWqrH1ub59vZPc7FUkMylytYVL50DNJhLYsRxlsu0y+yqtNBqhMP46+YqXsrtVQn7l2YNT5Dl5eX9/PTx69b2rXPycBRyeMYyZqr0zrL1TAT8aQXRSwzp9fr80Pf69+uSr88fQsVOAAAAp0lEQVQYGV3BW0KDMBQE0BkeuYHUDJRqUiPWqrTuf4WG/uk5AP8CG7ZdT2d+4EgSXXAH809RmlpWmOWjYogy37NCH46dd6OXHHcICks4tb2fyeeRhGn3EqJCkzJH6MHsPB1eU2aB6cH825rT+5pxOU2q7OP6mb7Sd8IGp108treUyx3gHH1UZUPKLCC3YfuRFLWs1zKCFRZFyaZCEiTBxWSyc0MW8J9fXc4LNjxfwOEAAAAASUVORK5CYII=',w:16,h:16,u:'http://www.myspace.com/Modules/PostTo/Pages/?u=%u&t=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'netvibes',n:'Netvibes',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAFfKj/FAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAF1QTFRF////AKMAAKgCAKwFALEEALUEALkCAL0BAL0CAMIAA8UAB74FIq8vKbMyK84KOdIbQNUkQNUmQdUmQ9UnRNYpTtofWd4ZZOEPZeERcOYLgu8flPFFlPgwovhQ////K6jB0gAAAAF0Uk5TAEDm2GYAAAB9SURBVBgZXcHRFoIgFEXBnSmEWlImZtL5/8/sruChmoFMEDmjQEpKtIac84tkCFKgNWwVl3i7K94mnJFzjnNT8MofsFWklJQMU5x1neOFEGRCwDknZ2grmuLM/vyxsxaPtWIppKWgN6p6g/d+GE5e8gVdIXUFxz8wHr6MvAFKvA8gnLCOBQAAAABJRU5ErkJggg==',w:16,h:16,u:'http://www.netvibes.com/subscribe.php?url=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'newsgator',n:'Newsgator',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAAEVmidkAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAxQTFRF////qamp/6kA////Tvcs2QAAAAF0Uk5TAEDm2GYAAABJSURBVAgdBcGxDcJAEATAwQghEbkDp6+r4ktzTBUXrq4aSmLG6UZjnPgaj20tKRVP3hsSiV4S1Vw/vDafrtt0xThiuqJm2jHxB3xgFqYgm6DqAAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.newsgator.com/ngs/subscriber/subext.aspx?url=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'newsvine',n:'Newsvine',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAmUlEQVR42pXQ2w3DIAwFUM/Smbr/CiXmYcBIFCdSFUxKiJQPFPnge4GUc8qcmeH9mn/MRcbUdK1VHZQ5QDmDY3QG+AQUU5KLgHxZ4LdnBDrSuKQH+4oHHWIPbjo04JwPgRY7xJjA9mDeQQA673sw6UAxAloJtdiBqIFdLHYIRGA2IZdgTCVZDNp/YPwp4GPQbBbR3YL2nu3qLyQ1V3qO5UJ9AAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.newsvine.com/_tools/seed&save?popoff=0&u=%u&h=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'plaxo',n:'Plaxo',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6REJCREQ3MDVCMTFCMTFFMDg3NzJENDVBQUFCMDgxN0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REJCREQ3MDZCMTFCMTFFMDg3NzJENDVBQUFCMDgxN0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEQkJERDcwM0IxMUIxMUUwODc3MkQ0NUFBQUIwODE3RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEQkJERDcwNEIxMUIxMUUwODc3MkQ0NUFBQUIwODE3RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Phw9S4MAAAJwUExURQVIlhlIfABOoRtJhQBTkwRVliRSaR9RjghVrQZamDBRehJYkwlanCNXbyxUhxFckz9ScAtbshxaiy1WigpepA1eoBVdlypYjCpaghBdtQlhqEFWdQ1iohVhlSVeiy5blBFhtg9jqSxcmiVfkQNlxg9juTBekgVouRdlpQBn1jRggy5hmCpjkB5moAhpyBVorDtgjShkojlhlSBoojBlkS5lnghtvypmpRprrQVvxRBtuglwuylotQpxvDxmoDhomQBz1UFnmBJxxT1pmDNsmRlyzi5zrhd3zT5xnCtzxS91qUluoih2thJ84khzqj93piJ+0yuA0FF5rFR9kSmD5FZ9tlODmlCHxy6Q1y+R2FeLsy6Z6TqX3TWW/V6RvFiVxHWUsHSWsW6bunaXzHSYynSZxlei43ybyWKj2Xudy3OgyXyfu2Gk6Hmg2Y2gsXumt4Knt1uu/Gmt7mav9Fu08H6s3l+39oaxxJKu3Yi374683p+76pLA+5jG+J7G6aDG96/H85/R/6vT9rjP+avY/6ja/bXZ857f/5/f/6rc/6/b/7Tc/7Xe/7fg/7Lk/8nf/7Xl/6vp/8Hj/8Tl/8zq9MDw/9fq/9Tr/9Lv/9Lw+tbv/+Du8dbw/9rv/97w/8z3/835/+rx+ej29tv5/+/0+t75/+b3/+T4/+L5/9P+/9L//+b6+9n//97+/+X8/+f8/93//+v7/97//+/6/+z7/9////H78+D///z3/uL//+P//+r9/+T//+n+/+b//+f//+z+/+n///r6/+r//+v//+z///D+/+3//+7//+////D///H///L///P///T///v//4hbz1oAAAEbSURBVBgZARAB7/4AvsS+v4RyVE05XGiMqMqvwwDHxJRwGDFJAhUPI0Nnj8jJALGabw1IdZO/v4ZqPx9pnbQAv2sGVp+8ns7Gu7qNTg5hwQCRHlOZr8jDv7+/yqeAQUSIAHELd8jOlm0HNGLHzMdSFnYAUEyVo8NlPCAvSn6cvnk4WABHBay/vxcILicJWrytjhQ9AEIoqr+8JhEkNhxeurqBITsAUS21v8QwACUaHYqYvnwMWQBzEryrzRs+V1+FwciuMjN0AJAqv8imEHuSubDBmnhLLIcAs26yubcKg8fHvql9AxNgwwC4oaWyrAFVf4J6TzUiZL2bAMLPorygNxlFOgRGK2OXyMsAz6S2yotsXSlAW2aJvsDIxa28eBhbsyfRAAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.plaxo.com/events?share_link=%u&desc=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'plurk',n:'Plurk',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAARklEQVR42mNY5cZPEmIA4pvzG4hB5zP0ERqAHGIQxRr+4wZU1XBnQhrcDUD2kNRA+1B6c3jN03UT0BCxfsAe03A+sRpIQgB2ksH/QFAHIwAAAABJRU5ErkJggg==',w:16,h:16,u:'http://www.plurk.com/m?content=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'printer',n:'Imprimer la page',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAc9JREFUeNp8Uz1rKlEQPfthXBX8AUnxglFTyLMSbC1F/ABJISEJKV3JP7EMJHYvgp1gYWEptv4JIa8QK0XFz+x6M7PJblbRDDvsvTtnzpy5O1eq1+s4sBdyHcftlbzi/qAeIpbLpV4ul49m12o13e/37xOk02lnUywWRS6XwymbTqdoNBqi1WpJewra7fazLXsymZwksGOEF9xOPp+vyM1m80LTtKdCoaB4PB6Mx+OTBBxjDGERCAR0yv2rrlarx0QiYQXi8ThmsxlKpdJRAp/PZ2EYG4lE0Ov1blU6tPtoNAqNgtVqFUIISJLT4t6e17aFr8LodDo3THA9Go0QDAb3Et1rtzEJ+2Kx4D8WVnkxHA6t/mRZdlVi/yGRZYlIZQvD3B8fhkXCCjCfz7Fer53KtlRbvq1GURSHwDB2rAB8iNhutzBNE/V/bxASS/wWIPPzTUCuqERA77u7BwvAuepms7EqmYaJM82Lyz+XOL84pzgnfpHxGySfW31//0/FDIjdDpwrZbNZZ/ZDoRAymQySyeTRA+z3+3zyGAwGzt1QY7FYxb4gpESkUqmTg8SxbrcLyvkZ5cPJ83q9+M0OR13lyXNfV5pCHb/bq3vzKcAAxN7ZHERopGgAAAAASUVORK5CYII=',w:16,h:16,u:'javascript:window.print()',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'reddit',n:'Reddit',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAA/FBMVEXW8P/F3fbI4Pq/1u5SW2VlcX2ImKNianNkZWd8ipmMna5fanWtwclfbHpgXVv69/RKTlPJ4fvP6P5pdYKmuc5wfIhWWl6On7CxyN+NobR5ipspLzZ3h5iar8XC2vPJ4/6mu8ldZGtueYRvfoxkam2KjY2lo6G0s7Kfnp17gIBbYWZscHbe3No+PDqJh4bz9vT+/v53e4BxcG+urq7+pqT+EA/+w8GQo7hHR0f+srD+MjD+zsxucHLd+P5TXGXPzMmoqarS0tLw8PDd9/6sw9dGSk6+u7nLy8uBgYF+fn6xyN1VXmdqa2yvravT0c/Z19WjuM54iJhnc4BjbXiffzb6AAAAj0lEQVQYGV3BQUpCARhG0Xvp92Uk6CBsJi0kF+CotTpqBe1DbBaIBg5eonz6HiHiOdwTuZWi57+WopehvZbiYuL2yQ0vCiK82vuerYlvXv0lWdWzHS5SSahGT6WHJjk+JFRjy0APg+R4GgZ533M1+krNHf8y0WTHOFCNTn8eNWGagLiwk84nEeFDTbIEwr0zLSw5wQp1YDAAAAAASUVORK5CYII=',w:16,h:16,u:'http://reddit.com/submit?url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'seenthis',n:'Seenthis',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDExODM3OEJCMTQ1MTFFMDgwNUQ4RkMxMTlFQjI5QjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDExODM3OENCMTQ1MTFFMDgwNUQ4RkMxMTlFQjI5QjEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEMTE4Mzc4OUIxNDUxMUUwODA1RDhGQzExOUVCMjlCMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEMTE4Mzc4QUIxNDUxMUUwODA1RDhGQzExOUVCMjlCMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsmtAXUAAAJPUExURdQGpOyG1ORGvPTG7NwmtPSm3Pzm9ORmzNwWrNw2vPzW9PS25Ox2zOyW3Pz2/ORWxNwOrNwerNw+vOx+1OyO1PTO7NwutPSu5Pzu/Pze9PS+5NwKrORSxORuzOx6zOye3Pz+/ORexNwitOQ+vPTC7NQKrOyK1ORKvPTK7NwqtPSq5Pzq9ORqzNwarNw6vPza9Oya3Pz6/ORaxNwSrNwetOyC1OyS3PTS7NwytPSy5Pzy/Pzi9PS+7Ox61ORCvNcFp9cEp9cFptYFptYEptYEp9kTq9gQq9YFp9gPqtkUrNgLqel1zvnZ8f////7+/vfQ7uVextcHp9cGp+RZxPbJ6/79/vrg9Ol50NgNqtgOqvS85/Cl3+2R2PbJ7Noaru6X2u+c3OZkyPbH69gMqdwlsv75/eNQwdcIqPrj9euD0+duzPfO7d86ufzw+doYre2T2d87uuVfx+dsy+2Q2OuF1OVdxfO35eZlyN4xtvzu+dkWrfvq9/rf9PbI69oZruNRwf76/d0ttd0uteJLv/rl9f3z+vfP7t41uNoXre2S2NcEpul2zvbL7Pnc8vGq4dkRq/fS7/Ky5PGp4Pvm9ul60OFGvuyI1f77/dwps+NTwuRXxPbM7e6a2+BBvP/+/uBCvP3y+uh0ztcJqPGs4e+b2/jW8NgNqel4z/vn9tser+FJvuA+u+BAvP75/NshsPvl9ul5z90rtPvp99kTrO+e3Pne8+qB0vXB6dcLqd0qtOp90dkVrPXD6dcKqeA9u/vr9+ZnydshsfjV8ORaxfvo9xpNpYMAAAB0SURBVBhXtcixCQJBFEXR6ezNvPnyswumagWCsbGwGy92IeaCuRZm4Cg24AlPkaTWWvNQqiQJttIOpNJVa98DawGHEUdgIwAVu3d7gtknwCO8cLb9E0K2mb7BxfYVu4SkiBuZueKe+Y7HMzIT5SciIoe/xAuEn0mlXOBCbwAAAABJRU5ErkJggg==',w:16,h:16,u:'http://seenthis.net/#ajouter=%t&url_site=%u&extrait=%d',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'slashdot',n:'Slashdot',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAA2UlEQVR42nWQiQ6EIAwF++l+8q6KymGy03II6pKXyDFDi+JDDJGkSNKf2CkYsPDJqI2z5LS0ZdWApd49oDJNOU0DMCFJvV65NpogImetlotYS6Wd4rzQVbhaeu0HoX+MCVToSpCBTuO7y6NDvJ7xX7j+0rbtx+F1hNDTLEkeOvcBDFiF/U3IaNu5BKeC1hjpOPgWMGBZnTV1+Fs/ODeBfec2Wc14dv+swBGszIsq/S7ttdxo4CJoczb4AeSw5HneBzDByee7zPO6rE41t3NANkues8kRAFcD/wBvW0sJy9S7MwAAAABJRU5ErkJggg==',w:16,h:16,u:'http://slashdot.org/bookmark.pl?url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'stumbleupon',n:'StumbleUpon',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAACq0lEQVR42jVSTUzTUBx/r2thK2OMjTG2AEbcB8aQLIKaoYmJmkj84GAGiSaeTBC4G25y8ODVxJsHoiZy0RgSAWNCNJIYdzIOkI8MNrBjjjFcN7Zu7Wv7/JfhS/ravv7//X39MaUU/V/wrOu6pmmw184ZhjEdLYxxrYaFS1VVlmWhIlZdmivNfih/2rSsVivyRdrfq/WNm8dsNhvP87U2XPsT7D8rsRF1fFfZLpfKRCEykXVNRxjx1YZF5mtHR4fdbuc4zmioVd+T7gp5QVEUAKSIQinSj0jkcOK8kIolAoGAw+E4ZnJnN7Kzn3SoJ1u4BmANkNjE7GirWrWKMG20WuNSHY7Hg8Gg0fBu7a0g/v58IRrm+0qawRAUNjF4WUv0LgSBGAByrs7Xs/MPLRYWPImq0dPm0GW+b+j9xsfFTVKRQNvAubaZB5faTL50eQMZ/PDCcur6GTsDDn6Xo0JBqCDl2c3Am0dXI7dCSi63tL0PULY625EOUI+TuiuTyTBAiTHhorQXioafZ5+6XKuvbvtdATfl6g3XWYyMO6YsixhTqVQychjVRqcdc8WyNLUyJZJ8uOss0clehatQNOwZtte1NGHrj91kK81DBFiW5UKx2Ox01pIER19uiWOT8/BpcmJgoqeZRfRbTrr25MsQ+6u/qwETQrLZ7I2ZZOZvWVGJmC/R9CFqbkIyQby58YSbZ+lebIvPpUe6s+FwmIXArVZrpJN9nGAogQRsyGs3XLEABj6Mpw/FQj0pD3YzXq8X8mbBQbPZfL+nLZMpvFj8Q2RDKWIwZI0gAEXhlcKgTw3YJJ8v5PF4jkcD5KdSqfX19dk1cXqlWhVVAGmluSunTB5OhDq/3w8xt7e3Hw8fxCdJ0sHBQTqdFgQB/IZXOAe2brcbmECP0+mEmf0HADltR86FPxIAAAAASUVORK5CYII=',w:16,h:16,u:'http://www.stumbleupon.com/submit?url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'technorati',n:'Technorati',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAPFBMVEUAAACo3H1mwhlVuwD///+Gz0rc8crP7LfG6arx+elvxSdyxyzt+OSZ1maU1F7Q7Lm/5p/g89B+zD6L0FEJLsdIAAAAAXRSTlMAQObYZgAAAG9JREFUGBllwQtuhDAUBMF57sZrHMjmc/+7BkSCtEpV/qtGeUsKFrUvjbZ0TYOHDi7DAKtOLm8G2LTxywBddy5lgHe1OO0aDkPdnuPhIZy6fz7Cqeuqfo4vwmndvplzcgiHWdzSeNFSvKikGre25wfvbgPcQbQuHQAAAABJRU5ErkJggg==',w:16,h:16,u:'http://technorati.com/faves?add=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'tumblr',n:'Tumblr',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABzUlEQVR42mP4+eu3hn0EkQiomAFIKVmFeGW0QJB3JhC1YkVazgkq1kEgDZ5pTZ7pQNQMQQ+fvXn97rNjdDGmKVAN7qkNYNTokdrYOnMNUDUQaZg4IZviBUQZzcoQDa7JdUDkllzft3DTw6dvIBoik/MK2uem1U8DmuKRBkRNQATV4JxY4wJGEKXI6MCJSw7RJW4p9W4pDe4pDcpWgSANjnGVjvFVTvFV+09cvP/oBUTprgPHgWja3GX69oEuSbWuIFQH1WAfUw5EDrEVthGFe4+cg/vBxDPO1DPOwj/VKaHaGYyUIBpso0qByA6IossOnLwCVP38xVugBogpEARyRVylkmUASIN1RJF1RLENGO0+cu7hw6f37z8GaoCbAkFA/YoQDZahBZZhBVZhhUC0be8xoGogCovPApqSWtUfkNloE1kCRLaRJYoW/iAN5sF55iF5FiCUv3rLfogGOIovaLIKL7QKL7IOL4JqMAvKgaHcsNzmLbsOw1Xv3X/U3jPMIjQfiIAOUTD3A2kwCcgyCcg2DYQiY59kbRtfoJOA3gAibSsvs+BccxDKg2oAJj5j/0wgAutERghTgAioDKThw8fP8ma+eJCCOQIBFQMAo2xGL1JiFu8AAAAASUVORK5CYII=',w:16,h:16,u:'http://www.tumblr.com/share?v=3&u=%u&t=%t&s=',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'twitter',n:'X',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TRZGKiB1EOmSoThb8Qhy1CkWoEGqFVh1MLv2CJg1Jiouj4Fpw8GOx6uDirKuDqyAIfoA4OzgpukiJ/0sKLWI8OO7Hu3uPu3eAUC8zzeoYAzTdNlOJuJjJropdrxAQRD8iGJeZZcxJUhK+4+seAb7exXiW/7k/R6+asxgQEIlnmWHaxBvE05u2wXmfOMyKskp8Tjxq0gWJH7muePzGueCywDPDZjo1TxwmFgttrLQxK5oa8RRxVNV0yhcyHquctzhr5Spr3pO/MJTTV5a5TjOCBBaxBAkiFFRRQhk2YrTqpFhI0X7cxz/k+iVyKeQqgZFjARVokF0/+B/87tbKT054SaE40PniOB/DQNcu0Kg5zvex4zROgOAzcKW3/JU6MPNJeq2lRY+Avm3g4rqlKXvA5Q4w+GTIpuxKQZpCPg+8n9E3ZYGBW6BnzeutuY/TByBNXSVvgINDYKRA2es+7+5u7+3fM83+fgBrMHKkBAPXgQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB+gCAxEhHjXCLgYAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAByklEQVQ4y6XTv48pURQH8HMvo9QKQqJZSonGH8AUXqISNaPbXqcgmEIr8T9oFDKLREUehen9iMLMkGEmitHpvlu8xEbGy27eu8kp7rk5n+R8k8tSqVTUsqyeZVm/GGP0kwOAAoHARzgcfqdIJKIQEf6lIpGIQoIgQBRFOI4Dx3FgmibW6zUYYy+HVFVFv98HEcHr9YJ8Ph+ICM1mE7quIxaLYTQaYTgcuoYXiwUmk8njLgjCF0BEGI1GmM1m4Jxjs9mgXq8/3gaDAVar1RPoAhhj2O/36Ha7yOVy0HUdmUwG/X4fqqq61nIBRIR8Pg/LslAul9FqtWDbNna7Hfx+v2ullwARQZZlHI9HJBIJjMdjKIryMtC/AkSE5XKJ+XwOxhi22+1THt8CtVoNl8sFh8MBvV4P+XwehmEgm81+D1QqFZxOJ5RKJRSLRVyvV0iShHa7je12+xSkCyiXyzAMA5IkPXqdTgemaSKZTLryeAIKhQJs20a1WnWtNJ1OsVgswDnHbrdDo9H4AgRBQDqdhqZpkGX5ZaCcc2iahvP5jOv1itvtBlEU/wD/85mi0ajiicfjvznnb/f7/c3j8dBPinNOwWDwIxQKvX8CpmKO6rojlxIAAAAASUVORK5CYII=',w:16,h:16,u:'http://twitter.com/intent/tweet?text=%t&url=%u',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'viadeo',n:'Viadeo',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAA1VBMVEX5+vv6+/v6+/z7+/z7/Pz/47r/piD/4LL8/Pz8/P3/sDr/mQD/qiv/ulL8/f3/v1//uVH/zoP9/f3jtWTbrVv4lwTp1a/I3Oe00eHw2K//pBv/0Yp1q8y+2Oatzt/p0KL/sTv/vVlanL0rgKonfakAZpkadqO10+LZs2oje6fUsGn5+vr6+vr/3q319vf3+Pj4+fn/0476+vv09fb29/j1lwb39/j19fb09PX29vfhtmnXsGX/1JH/58Ty8/T/tEP/6sr3+Pny8/Xw8fPy8vTz9PX19ffHzf0CAAAA0klEQVQYGQXBwU7CQBSG0e/v3DuFQlKrBtEaNyyMG1e+/0O4YOFGExcQDRgSRKDtjOcISUJCA5mUpUImJDSQ+5wKMQ6DO5gPYYxMSniQKclJokh0VI4Zo4qaVCiHC4t9jH2o4g+St1rDrZRWEJuV7naMjamQ0Ce1AUS8hz+mQDjOj+2oPMq7aUnct3qWtA6zb11/nducs7levRo4i7pa1vcq3J1Dd1osTs2SXdlb/PWunr1/4N75y35i8HB5mLyJvnlqtm7mjbZX6048buabm5P+AaplRfpAqaBZAAAAAElFTkSuQmCC',w:16,h:16,u:'http://www.viadeo.com/shareit/share/?url=%u&title=%t',u_site:'https://www.argotheme.com/organecyberpresse'},
{a:'yahoomyweb',n:'Yahoo! MyWeb',i:'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABjUlEQVR42oWQO0sDQRSFJz4CioFVgpWFMQoJ+CD6B9RfoqVVgiJiJWJrZaciCNqIIFoq2IiIlTHBRhEETQIhAU12N499He/MPlOIw4Fd5p7v3nOHtTVd00mGTjL+kKiSjcyMPrZVHJP0ujvv6W5FEpcORmbm9jZtt2FyANgGtuov4y5gkkEABnPbc6t9BLAMLNkA3VBJMLy1iOTEcRgBLAILzoQA4Efy8riR4kDMBwwPoAnuiOCuQJhkA57cpTXvlXjv72wI6FDxJsTd3is1Gs1Wq82Pxk9+k6mfvpv+nzYkKlGZbGTmQDBMNiNlMw7D3Wn2uDoaDMZUAVBcmLOw5lqF5MfhYG69q/oQyq2Fvvb6cTmA0zAOWHmHcUBRGxzIx6GloKfQnNFLidJZ9DndXdyPWLdD1lUEJ70BQFEdQJ6CMo3aJCpJ/W2sehG17ocJ4BOOe3ygLisOUElylRMoTOA9ZmVHCMC1hPM+HHV1AMGd/hX7qcn1uiIrKi2jqk16A1JDyP6nSyqRgVqT+RfsSzsEsLzFQAAAAABJRU5ErkJggg==',w:16,h:16,u:'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=%u&t=%t',u_site:'https://www.argotheme.com/organecyberpresse'}
];
var title=$('head > title').text()||'';
var description=($('meta[name=description]').attr('content')||'').substr(0,250);
var cano=$('link[rel=canonical]')[0];
var url=cano?cano.href:document.location.href.split("%23")[0].split("#")[0];
var ul=$('<ul><\/ul>');
var esc=function(x){return encodeURIComponent(x).replace(/\s/g,' ');};
var ref=document.referrer.match(/^.*\/\/([^\/]+)\//);
if(ref&&ref[1].match(/\.facebook\./))
Cookies.set('social_facebook',1,{path:'/',expires:30});
$.each(socialtags,function(){if(this.u){
if(this.a=='bookmark'&&!document.all)return;
$('<a rel="nofollow" onclick="if (this.href.lastIndexOf("javascript:") != 0 ) { window.open(this.href, "_blank", "screenX=50,left=50,screenY=50,top=50, width=550, height=450,toolbar=no, location=no,resizable=yes, scrollbars=yes");return false; }"><img class="socialtags-hovers" src="'+this.i+'" width="'+this.w+'" height="'+this.h+'" alt="'+this.a+'"\/><\/a>')
.attr('href',
this.u
.replace(/%u/g,esc(url))
.replace(/%t/g,esc(title))
.replace(/%d/g,esc(description))
.replace(/%u_site/g,esc(this.u_site))
)
.attr('title',this.n).wrap('<li class="'+this.a+'"><\/li>')
.parent().appendTo(ul);
}});
selector.append(ul.wrap('<div class="socialtags"><\/div>').parent());
};
$(function(){
$(socialtags_init);
});
})(jQuery);
/* local/cache-js/jsdyn-jquery_cookiebar_js-4c7fc757.js?1756489818 */
(function($){
$.cookieBar=function(options,val){
if(options=='cookies'){
var doReturn='cookies';
}else if(options=='set'){
var doReturn='set';
}else{
var doReturn=false;
}
var defaults={
message:"<span class=\"cb-msg\">D\u00e9cider :<\/span>",
acceptButton:true,
acceptText:'Accepter les cookies améliore votre expérience avec notre site.',
declineButton:true,
declineText:'Désactiver les cookies',
policyButton:true,
policyText:'Politique de confidentialité',
policyURL:'',
autoEnable:true,
acceptOnContinue:false,
expireDays:365,
forceShow:false,
effect:'slide',
element:'body',
append:false,
fixed:true,
bottom:true,
zindex:'999',
redirect:String(window.location.href),
domain:String(window.location.hostname),
referrer:String(document.referrer)
};
var options=$.extend(defaults,options);
var expireDate=new Date();
expireDate.setTime(expireDate.getTime()+(options.expireDays*24*60*60*1000));
expireDate=expireDate.toGMTString();
var cookieEntry='cb-enabled={value}; expires='+expireDate+'; path=/';
var i,cookieValue='',aCookie,aCookies=document.cookie.split('; ');
for(i=0;i<aCookies.length;i++){
aCookie=aCookies[i].split('=');
if(aCookie[0]=='cb-enabled'){
cookieValue=aCookie[1];
}
}
if(cookieValue==''&&options.autoEnable){
cookieValue='enabled';
document.cookie=cookieEntry.replace('{value}','enabled');
}
if(options.acceptOnContinue){
if(options.referrer.indexOf(options.domain)>=0&&String(window.location.href).indexOf(options.policyURL)==-1&&doReturn!='cookies'&&doReturn!='set'&&cookieValue!='accepted'&&cookieValue!='declined'){
doReturn='set';
val='accepted';
}
}
if(doReturn=='cookies'){
if(cookieValue=='enabled'||cookieValue=='accepted'){
return true;
}else{
return false;
}
}else if(doReturn=='set'&&(val=='accepted'||val=='declined')){
document.cookie=cookieEntry.replace('{value}',val);
if(val=='accepted'){
return true;
}else{
return false;
}
}else{
var message=options.message.replace('{policy_url}',options.policyURL);
if(options.acceptButton){
var acceptButton='<a href="" class="cb-enable">'+options.acceptText+'</a>';
}else{
var acceptButton='';
}
if(options.declineButton){
var declineButton='<a href="" class="cb-disable">'+options.declineText+'</a>';
}else{
var declineButton='';
}
if(options.policyButton&&options.policyURL){
var policyButton='<a href="'+options.policyURL+'" class="cb-policy">'+options.policyText+'</a>';
}else{
var policyButton='';
}
if(options.fixed){
if(options.bottom){
var fixed=' class="fixed bottom"';
}else{
var fixed=' class="fixed"';
}
}else{
var fixed='';
}
if(options.zindex!=''){
var zindex=' style="z-index:'+options.zindex+';"';
}else{
var zindex='';
}
if(options.forceShow||cookieValue=='enabled'||cookieValue==''){
if(options.append){
$(options.element).append('<div id="cookie-bar"'+fixed+zindex+'><p>'+message+acceptButton+declineButton+policyButton+'</p></div>');
}else{
$(options.element).prepend('<div id="cookie-bar"'+fixed+zindex+'><p>'+message+acceptButton+declineButton+policyButton+'</p></div>');
}
}
$('#cookie-bar .cb-enable').click(function(){
document.cookie=cookieEntry.replace('{value}','accepted');
if(cookieValue!='enabled'&&cookieValue!='accepted'){
window.location=options.currentLocation;
}else{
if(options.effect=='slide'){
$('#cookie-bar').slideUp(300,function(){$('#cookie-bar').remove();});
}else if(options.effect=='fade'){
$('#cookie-bar').fadeOut(300,function(){$('#cookie-bar').remove();});
}else{
$('#cookie-bar').hide(0,function(){$('#cookie-bar').remove();});
}
return false;
}
});
$('#cookie-bar .cb-disable').click(function(){
var deleteDate=new Date();
deleteDate.setTime(deleteDate.getTime()-(864000000));
deleteDate=deleteDate.toGMTString();
aCookies=document.cookie.split('; ');
for(i=0;i<aCookies.length;i++){
aCookie=aCookies[i].split('=');
if(aCookie[0].indexOf('_')>=0){
document.cookie=aCookie[0]+'=0; expires='+deleteDate+'; domain='+options.domain.replace('www','')+'; path=/';
}else{
document.cookie=aCookie[0]+'=0; expires='+deleteDate+'; path=/';
}
}
document.cookie=cookieEntry.replace('{value}','declined');
if(cookieValue=='enabled'&&cookieValue!='accepted'){
window.location=options.currentLocation;
}else{
if(options.effect=='slide'){
$('#cookie-bar').slideUp(300,function(){$('#cookie-bar').remove();});
}else if(options.effect=='fade'){
$('#cookie-bar').fadeOut(300,function(){$('#cookie-bar').remove();});
}else{
$('#cookie-bar').hide(0,function(){$('#cookie-bar').remove();});
}
return false;
}
});
}
};
})(jQuery);
/* plugins/auto/cookiebar/v1.3.0/js/jquery.cookiebar.call.js?1720198656 */
(function($){
$(document).ready(function(){
$.cookieBar();
});
})(jQuery);
/* plugins/auto/boutonstexte/v3.1.0/javascript/boutonstexte.js?1720198672 */
if(typeof jQuery=='function')
(function($){
$(function(){
var boutonstexte=new boutonsTexte(boutonstexte_options);
var boutons=$('<span class="boutonstexte"></span>');
if(!$(".textsizeup").length&&boutonstexte.txtSizeUp){
$('<a href="#" class="textsizeup auto"><img src="'+boutonstexte.imgPath+'fontsizeup.svg" alt="'+boutonstexte.txtSizeUp+'" /></a>')
.appendTo(boutons);
}
if(!$(".textsizedown").length&&boutonstexte.txtSizeDown){
$('<a href="#" class="textsizedown auto"><img src="'+boutonstexte.imgPath+'fontsizedown.svg" alt="'+boutonstexte.txtSizeDown+'" /></a>')
.appendTo(boutons);
}
if(!$(".textonly").length&&boutonstexte.txtOnly){
$('<a href="#" class="textonly auto"><img src="'+boutonstexte.imgPath+'textonly.svg" alt="'+boutonstexte.txtOnly+'" /></a>')
.appendTo(boutons);
}
if(boutons.html()){
$(boutonstexte.selector).before(boutons);
}
$("img.textsizeup,a.textsizeup,button.textsizeup")
.click(function(e){
boutonstexte.fontBigger($(this).is('.auto')?this:null);
e.stopPropagation();
return false;
})
.attr({'title':boutonstexte.txtSizeUp});
$("img.textsizedown,a.textsizedown,button.textsizedown")
.click(function(e){
boutonstexte.fontSmaller($(this).is('.auto')?this:null);
e.stopPropagation();
return false;
})
.attr({'title':boutonstexte.txtSizeDown});
$("img.textonly,a.textonly,button.textonly")
.click(function(e){
boutonstexte.texteOnly($(this).is('.auto')?this:null);
e.stopPropagation();
return false;
})
.attr({'title':boutonstexte.txtOnly});
});
})(jQuery);
function boutonsTexte(options)
{
this.rate=1.2;
this.selector="#contenu .texte";
for(opt in options){
this[opt]=options[opt];
}
}
boutonsTexte.prototype.texteOnly=function(elt)
{
var that=this;
var texte=jQuery(elt).parent().next();
jQuery("body").toggleClass('onlytext_wrapper');
if(this['backTextOnly']){
texte.removeClass("onlytext");
jQuery(elt).attr({'title':that.txtOnly}).
parent().insertBefore(jQuery("#marktextonly")).after(texte);
jQuery("#marktextonly").remove();
jQuery('body').children().removeClass('onlytext_hide');
this.backTextOnly=false;
return;
}
texte.addClass("onlytext");
jQuery(texte[texte.length-1]).after('<div id="marktextonly">marktextonly</div>');
$('body>*').addClass('onlytext_hide');
jQuery(elt).attr({'title':that.txtBackSpip}).
parent().prependTo("body").after(texte);
this.backTextOnly=true;
}
boutonsTexte.prototype.fontBigger=function(elt)
{
var that=this;
var work=elt?jQuery(elt).parent().next():jQuery(this.selector);
work.each(function(){
wrap=jQuery(this);
if(jQuery.browser.msie){
var wrap=jQuery(this).children('.fontwrap');
if(!wrap.length){
jQuery(this).html("<span class='fontwrap' style='font-size:100%'>"
+jQuery(this).html()+"</span>");
var wrap=jQuery(this).children('.fontwrap');
}
}
var m=wrap.css('fontSize').match(/(\d+(?:\.\d+)?)(.*)/);
wrap.css('fontSize',(that.rate*parseFloat(m[1]))+m[2]);
});
}
boutonsTexte.prototype.fontSmaller=function(elt)
{
var that=this;
var work=elt?jQuery(elt).parent().next():jQuery(this.selector);
work.each(function(){
wrap=jQuery(this);
if(jQuery.browser.msie){
var wrap=jQuery(this).children('.fontwrap');
if(!wrap.length){
jQuery(this).html("<span class='fontwrap' style='font-size:100%'>"
+jQuery(this).html()+"</span>");
var wrap=jQuery(this).children('.fontwrap');
}
}
var m=wrap.css('fontSize').match(/(\d+(?:\.\d+)?)(.*)/);
wrap.css('fontSize',(parseFloat(m[1])/that.rate)+m[2]);
});
}
function dump(elt)
{var txt='';for(var prop in elt){txt+=prop+'='+elt[prop]+'/';}alert(txt);}
/* plugins/auto/saisies/v5.14.0/javascript/saisies.js?1755204172 */
jQuery(function(){
saisies_fieldset_pliable();
saisies_fieldset_onglet();
saisies_multi_novalidate();
SaisiesDateJourMoisAnnee.init();
onAjaxLoad(saisies_fieldset_pliable);
onAjaxLoad(saisies_fieldset_onglet);
onAjaxLoad(saisies_multi_novalidate);
onAjaxLoad(saisies_date_jour_mois_annee);
});
function saisies_fieldset_pliable(){
jQuery('.fieldset.pliable')
.each(function(){
var fieldset=jQuery(this);
var groupe=jQuery(this).find('> .editer-groupe');
var legend=jQuery(this).find('> legend');
if(fieldset.find('.erreur').length>0){
fieldset.removeClass('plie');
}
if(fieldset.is('.plie'))
groupe.hide();
legend
.unbind('click')
.click(
function(){
fieldset.toggleClass('plie');
if(groupe.is(':hidden'))
groupe.show();
else
groupe.hide();
}
);
});
};
function saisies_fieldset_onglet(){
var classes={
wrapper_horizontal:'saisies-onglets',
wrapper_vertical:'saisies-onglets saisies-onglets-verticaux',
tablist:'saisies-menu-onglets',
tablist_items:'saisies-menu-onglets__items',
tablist_item:'saisies-menu-onglets__item',
tablist_link:'saisies-menu-onglets__lien',
active:'actif',
error:'erreur',
scrollable:'scrollable',
tabscontents:'saisies-contenus-onglets',
tabcontent:'saisies-contenu-onglet afficher_si_sans_visuel',
}
var selecteur_fieldset='.fieldset.fieldset_onglet:not(.pliable)';
var storage=window.sessionStorage;
var init=function(){
$.each(collections_fieldsets(),function(i,$fieldsets){
classes.wrapper=classes.wrapper_horizontal;
$fieldsets.each(function(){
if($(this).hasClass('fieldset_onglet_vertical')){
classes.wrapper=classes.wrapper_vertical;
return false;
}
});
var
$conteneur=$('<div class="'+classes.wrapper+'"></div>'),
$menu=$('<nav class="'+classes.tablist+'"><ul class="'+classes.tablist_items+'" role="tablist"></ul></nav>'),
$contenus=$('<div class="'+classes.tabscontents+'"></div>'),
ids_contenus=[],
$first_fieldset=$fieldsets.first(),
id_menu=null;
$conteneur.append($contenus).insertBefore($first_fieldset);
$fieldsets.each(function(){
var
$contenu=$(this),
id_persistant=$contenu.attr('id')||$contenu.attr('data-id'),
afficher_si=$contenu.attr('data-afficher_si')||'true',
id_contenu=id_persistant||randomId(),
id_onglet='onglet-'+id_contenu;
$contenu
.attr('id',id_contenu)
.addClass(classes.tabcontent)
.attr('role','tabpanel')
.attr('aria-labelledby',id_onglet)
.attr('data-saisies-onglet',true)
.hide().attr('hidden','')
.appendTo($contenus);
var titre=$contenu.find('legend').first().hide().text();
var $onglet=$('<li class="'+classes.tablist_item+'"><a class="'+classes.tablist_link+'" href="#'+id_contenu+'" id="'+id_onglet+'" aria-controls="'+id_contenu+'" role="tab" aria-selected="false" tabindex="-1">'+titre+'</a></li>');
var autoriser_changement=false;
$onglet
.attr('data-afficher_si',afficher_si)
.click(function(){
var sibling_active=$(this).siblings().has('.'+classes.active);
sibling_active.each(function(){
var onglet_reference=$(this).find('a').attr('href');
autoriser_changement=container_reportValidity(onglet_reference);
});
if(!sibling_active.length){
autoriser_changement=true;
}
if(autoriser_changement){
activer_onglet($(this).find('.'+classes.tablist_link));
}
return false;
});
$onglet.on('afficher_si_masque_pre',function(){
$this_onglet=$(this);
$lien=$this_onglet.children('a');
if($lien.attr('aria-selected')=='true'){
$nouvel_onglet=$this_onglet.siblings().not('.afficher_si_masque').first().children('a')
desactiver_onglet($lien);
activer_onglet($nouvel_onglet);
}
});
$onglet.on('afficher_si_visible_post',function(){
$voisins=$(this).siblings().not('.afficher_si_masque');
if(!$voisins.length){
activer_onglet($onglet.children('a'));
}
});
if(id_persistant){
ids_contenus.push(id_persistant);
}
if($contenu.find('.editer.erreur').length){
$onglet.children('a').addClass(classes.error);
}
$menu.find('.'+classes.tablist_items).append($onglet);
});
if(ids_contenus.length===$fieldsets.length){
id_menu='onglets-'+hashCode(ids_contenus.join(''));
$menu.attr('data-id',id_menu);
}
$menu.prependTo($conteneur);
if($menu[0].scrollWidth>$menu[0].clientWidth){
$menu.addClass(classes.scrollable);
}
var $onglet_defaut;
if($('.'+classes.tablist_link+'.'+classes.error).length>0){
$onglet_defaut=$menu.find('.'+classes.tablist_link+'.'+classes.error).first();
}else if(storage.getItem(id_menu)!==null&&$('#'+escapeId(storage.getItem(id_menu))).length>0){
$onglet_defaut=$('#'+escapeId(storage.getItem(id_menu)));
}else{
$onglet_defaut=$menu.find('.'+classes.tablist_link).first();
}
activer_onglet($onglet_defaut,0,false);
});
$('.'+classes.tabscontents+' [name]').on('invalid',function(){
$(this).parents('form').find('.'+classes.tabscontents).each(function(){
var id_fieldset='#'+$(this).find('> fieldset:invalid').first().attr('id');
var $onglet=$('a[href="'+id_fieldset+'"]');
activer_onglet($onglet);
});
});
}
var collections_fieldsets=function(){
var collections=[];
$(selecteur_fieldset).each(function(){
$fieldsets_niveau=$(this).add($(this).nextUntil(':not('+selecteur_fieldset+')')),
parsed=$(this).data('saisies-onglet-parsed')||false;
if(!parsed){
collections.push($fieldsets_niveau);
$fieldsets_niveau.each(function(){
$(this).data('saisies-onglet-parsed',true);
});
}
});
return collections;
}
var activer_onglet=function($onglet,duree=150,persistant=true){
$onglet_actuel=$onglet.parent().siblings().has('.'+classes.active).find('.'+classes.tablist_link);
desactiver_onglet($onglet_actuel);
if($onglet.length){
var $contenu=$(escapeId($onglet.attr('href')));
$onglet.addClass(classes.active).attr('aria-selected',true).removeAttr('tabindex');
$contenu.fadeIn(duree).removeAttr('hidden');
var id_menu=$onglet.parents('.'+classes.tablist).attr('data-id')||null;
if(persistant&&id_menu){
storage.setItem(id_menu,$onglet.attr('id'));
}
}
}
var desactiver_onglet=function($onglet,duree=150){
if($onglet.length){
var $contenu=$(escapeId($onglet.attr('href')));
$onglet.removeClass(classes.active).attr('aria-selected',false).attr('tabindex',-1);
$contenu.hide().attr('hidden','');
}
}
var escapeId=function(id){
id=(id||'').replace(/[^\d\w_\-\#]/gi,'\\$&');
return id;
}
var randomId=function(taille=8){
var random=(Math.random()+1).toString(36);
return random.substring(random.length-taille);
}
var hashCode=function(s){
for(var i=0,h=0;i<s.length;i++)
h=Math.imul(31,h)+s.charCodeAt(i)|0;
return Math.abs(h);
}
var container_reportValidity=function(selector){
var retour=true;
$(selector).find('[name]').each(function(){
retour=retour&&$(this).get(0).reportValidity();
});
return retour;
}
init();
}
function saisies_date_jour_mois_annee_changer_date(me,datetime){
var champ=jQuery(me);
var li=champ.closest('.editer');
var jour=jQuery.trim(li.find('.date_jour').val());
var mois=jQuery.trim(li.find('.date_mois').val());
var annee=jQuery.trim(li.find('.date_annee').val());
var date=jQuery.trim(li.find('.datetime').val());
while(jour.length<2){jour='0'+jour;}
while(mois.length<2){mois='0'+mois;}
while(annee.length<4){annee='0'+annee;}
if(datetime=='oui'){
heure=date.substring(10);
if(!heure||!(heure.length==9)){
heure=' 00:00:00';
}
date=annee+'-'+mois+'-'+jour+heure;
}
else{
date=annee+'-'+mois+'-'+jour;
}
li.find('.datetime').attr('value',date);
}
class SaisiesDateJourMoisAnnee{
constructor(container){
this.container=container;
this.dateWrapper=container.querySelector('[data-composant="date"]');
this.dateInput=container.querySelector('[data-composant-input="date"]');
this.jourInput=container.querySelector('[data-composant-input="jour"]');
this.moisInput=container.querySelector('[data-composant-input="mois"]');
this.anneeInput=container.querySelector('[data-composant-input="annee"]');
this.jourWrapper=container.querySelector('[data-composant="jour"]');
this.moisWrapper=container.querySelector('[data-composant="mois"]');
this.anneeWrapper=container.querySelector('[data-composant="annee"]');
this.resetBtn=container.querySelector('.btn_reset');
this.format=this.dateInput.dataset.format||'datetime';
}
static init(){
document.querySelectorAll('.saisie_date_jour_mois_annee .composants-date.mode-jour-mois-annee').forEach(container=>{
if(container.hasAttribute('data-saisies-initialized'))return;
const instance=new SaisiesDateJourMoisAnnee(container);
instance.setup();
instance.sync();
});
}
setup(){
this.container.setAttribute('data-saisies-initialized','true');
this.dateInput.type='hidden';
this.dateWrapper.classList.add('saisies-visually-hidden');
[this.jourInput,this.moisInput,this.anneeInput].forEach((input)=>{
const wrapper=input.closest('[data-composant]');
wrapper.removeAttribute('hidden');
wrapper.style.removeProperty('display');
if(input.dataset.disabled!=='true'){
input.removeAttribute('disabled');
}
});
this.resetBtn.style.removeProperty('display');
this.resetBtn.removeAttribute('hidden');
}
sync(){
const updateDateValue=()=>{
const jour=this.jourInput.hasAttribute('disabled')?'':this.jourInput.value.trim();
const mois=this.moisInput.hasAttribute('disabled')?'':this.moisInput.value.trim();
const annee=this.anneeInput.hasAttribute('disabled')?'':this.anneeInput.value.trim();
const allEmpty=!jour&&!mois&&!annee;
if(allEmpty){
this.dateInput.value='';
return;
}
const j=jour?jour.padStart(2,'0'):'01';
const m=mois?mois.padStart(2,'0'):'01';
const a=annee?annee.padStart(4,'0'):'0000';
let value=`${a}-${m}-${j}`;
if(this.format==='datetime'){
value+=' 00:00:00';
}
this.dateInput.value=value;
this.dateInput.dispatchEvent(new Event('change',{bubbles:true}));
};
[this.jourInput,this.moisInput,this.anneeInput].forEach(input=>{
input.addEventListener('input',updateDateValue);
});
if(this.resetBtn){
this.resetBtn.addEventListener('click',(e)=>{
e.preventDefault();
[this.jourInput,this.moisInput,this.anneeInput].forEach(input=>{
if(
!input.hasAttribute('readonly')
&&!input.hasAttribute('disabled')
&&input.dataset.readonly!=='true'
&&input.dataset.disabled!=='true'
){
input.value='';
}
});
updateDateValue();
});
}
updateDateValue();
}
}
function saisies_date_jour_mois_annee(){
SaisiesDateJourMoisAnnee.init();
}
function saisies_multi_novalidate(){
$('[name^="_retour_etape"],[name="aller_a_etape"]').click(function(){
$(this).parents('form').attr('novalidate','novalidate');
});
}
/* plugins/auto/saisies/v5.14.0/javascript/saisies_textarea_counter.js?1755204172 */
var Scampi=Scampi||{};
Scampi.textareaCounter=function textareaCounter(){
var textAreaFields=document.querySelectorAll("textarea[maxlength]");
var stepPolite=100;
var stepAssertive=20;
Array.prototype.forEach.call(textAreaFields,function(textarea){
var idTextarea=textarea.id;
if(!document.querySelector("#"+idTextarea+"-counter")){
var maxLength=textarea.getAttribute("maxlength");
var messageLength=textarea.value.length;
var activeValue=countRest(maxLength,messageLength);
textarea.setAttribute("aria-describedby",idTextarea+"-counter");
textarea.insertAdjacentHTML("afterend","<p class='textarea-counter' id='"+idTextarea+"-counter'><span class='textarea-counter-nb'>"+activeValue+"</span> "+saisies_caracteres_restants+"</p>");
textarea.addEventListener("input",handleInput);
textarea.addEventListener("keypress",handleInput);
}
});
function handleInput(evt){
textarea=evt.target;
paragraph=textarea.nextElementSibling;
updateValue(textarea,paragraph);
}
function countRest(maxlength,messageLength){
return maxlength-messageLength;
}
function countStepPolite(maxLengthValue){
return maxLengthValue-stepPolite;
}
function countStepAssertive(maxLengthValue){
return maxLengthValue-stepAssertive;
}
function updateAria(maxLengthValue,messageLength,paragraph){
politeFlag=countStepPolite(maxLengthValue);
assertiveFlag=countStepAssertive(maxLengthValue);
if(messageLength<politeFlag){
paragraph.removeAttribute("aria-live");
paragraph.removeAttribute("aria-atomic");
}
else if(messageLength>=politeFlag&&messageLength<assertiveFlag){
paragraph.setAttribute("aria-live","polite");
paragraph.setAttribute("aria-atomic","true");
}
else if(messageLength>=assertiveFlag){
paragraph.setAttribute("aria-live","assertive");
paragraph.setAttribute("aria-atomic","true");
}
}
function updateValue(textarea,paragraph){
var maxLength=textarea.getAttribute("maxlength");
var messageLength=textarea.value.length;
var counter=paragraph.querySelector(".textarea-counter-nb")
counter.innerText=countRest(maxLength,messageLength);
updateAria(maxLength,messageLength,paragraph);
}
}
jQuery(function(){
Scampi.textareaCounter();
onAjaxLoad(Scampi.textareaCounter);
});
/* plugins/auto/saisies/v5.14.0/javascript/saisies_afficher_si.js?1755204172 */
$(function(){
afficher_si_init();
onAjaxLoad(afficher_si_init);
});
afficher_si_current_data='';
function afficher_si_init(){
$('form:not([data-afficher_si-init])').each(function(){
if(this.hasAttribute('data-resume_etapes_futures')){
var resume_etapes_futures=this.getAttribute('data-resume_etapes_futures');
}else{
var resume_etapes_futures='';
}
if($(this).find('[data-afficher_si]').length!==0||resume_etapes_futures){
form=$(this);
form.find('.formulaire_spip__etapes').each(function(){
$(this).css('min-height',$(this).height());
});
afficher_si_init_chemin_etapes(form);
afficher_si_set_current_data(form);
form.find('[data-afficher_si]').each(function(){
condition=verifier_afficher_si($(this),true);
animer_afficher_si($(this),condition,true);
}
);
afficher_si_set_etapes_presentation_courante(form);
afficher_si_set_etape_suivante(form);
$(this).find('textarea, input, select').each(function(){
var name=$(this).attr('name');
if(name){
name=afficher_si_normaliser_name(name);
if(form.find('[data-afficher_si*=\''+name+'\']').length||resume_etapes_futures.includes(name)){
$(this).on('input change',function(){
afficher_si_onchange($(this));
});
}
}
}
);
$(this).attr('data-afficher_si-init',true);
}
})
}
function afficher_si_normaliser_name(name){
var name=name.replace('[]','');
var name=name.replace('_choix_alternatif','');
return name;
}
function afficher_si_onchange($champ){
if(name=$champ.attr('name')){
var form=$champ.parents('form');
var name=afficher_si_normaliser_name(name);
afficher_si_set_current_data(form);
form.find('[data-afficher_si*=\''+name+'\']').each(function(){
condition=verifier_afficher_si($(this));
animer_afficher_si($(this),condition);
})
afficher_si_set_etapes_presentation_courante(form,name);
afficher_si_set_etape_suivante(form,name);
}
}
function afficher_si_set_current_data(form){
current_data=form.serializeArray();
afficher_si_current_data=[];
$(current_data).each(function(){
if(this.name.includes('[]')){
this.name=this.name.replace('[]','');
if(Array.isArray(afficher_si_current_data[this.name])){
afficher_si_current_data[this.name].push(this.value)
}else{
afficher_si_current_data[this.name]=[this.value];
}
}else{
afficher_si_current_data[this.name]=this.value;
}
if(afficher_si_current_data[this.name]==='@choix_alternatif'){
afficher_si_current_data[this.name]=form.find('[name = "'+this.name+'_choix_alternatif'+'"]').val();
afficher_si_current_data[this.name+':choix_alternatif']=true;
}else{
afficher_si_current_data[this.name+':choix_alternatif']=false;
}
});
}
function verifier_afficher_si(saisie,chargement=false){
let condition=saisie.attr('data-afficher_si');
condition=eval(condition);
if(
chargement
&&!condition
&&(saisie.hasClass('erreur')||$('.erreur',saisie).length)
&&!saisie.hasClass('saisies-menu-onglets__item')
&&!saisie.hasClass('saisies-contenu-onglet')
){
console.log('Attention : saisies masquée par afficher_si avec une erreur...'+saisie.attr('data-id'));
return true;
}
return condition
}
function animer_afficher_si(saisie,condition,chargement){
if(condition){
if(!saisie.hasClass('afficher_si_visible')){
saisie.trigger('afficher_si_visible_pre');
saisie.removeClass('afficher_si_masque_chargement').removeClass('afficher_si_masque').addClass('afficher_si_visible').removeAttr('aria-hiden');
if(!saisie.hasClass('afficher_si_sans_visuel')){
afficher_si_show(saisie);
}
afficher_si_restaure_validation(saisie);
saisie.trigger('afficher_si_visible_post');
}
}else{
if(!saisie.hasClass('afficher_si_masque')){
saisie.trigger('afficher_si_masque_pre');
if(!saisie.hasClass('afficher_si_sans_visuel')){
afficher_si_hide(saisie);
}
if(chargement){
saisie.addClass('afficher_si_masque_chargement');
}
saisie.addClass('afficher_si_masque').removeClass('afficher_si_visible').attr('aria-hiden',true);
afficher_si_disable_validation(saisie);
saisie.trigger('afficher_si_masque_post');
}
}
}
function afficher_si_disable_validation($saisie){
for(attribut of afficher_si_validation_attributs){
if(attribut in afficher_si_validation_attributs_valeurs){
var selecteur=afficher_si_validation_attributs_valeurs[attribut].map((x)=>'['+attribut+'='+x+']').join(', ');
}else{
var selecteur='['+attribut+']';
}
var enfants=$saisie.find(selecteur);
enfants.each(function(){
$(this).attr('data-afficher_si-'+attribut,$(this).attr(attribut)).attr(attribut,null);
});
}
}
function afficher_si_restaure_validation($saisie){
for(attribut of afficher_si_validation_attributs){
var enfants=$saisie.find('[data-afficher_si-'+attribut+']');
enfants.each(function(){
if($(this).parents('.afficher_si_masque').length==0){
$(this).attr(attribut,$(this).attr('data-afficher_si-'+attribut)).attr('data-afficher_si-'+attribut,null);
}
});
}
}
var afficher_si_validation_attributs=[
'required',
'minlength',
'maxlength',
'min',
'max',
'type',
'step',
'pattern'
];
var afficher_si_validation_attributs_valeurs={'type':['email','url']};
function afficher_si(args){
if(afficher_si_current_data.hasOwnProperty(args['champ'])){
valeur_champ=afficher_si_current_data[args['champ']];
}else{
valeur_champ='';
}
valeur=args['valeur'];
if(!('modificateur'in args)){
args['modificateur']={'fonction':''};
}
if(
Array.isArray(valeur_champ)
&&(args['modificateur']['fonction']!=='total')
){
if(args['operateur']=='=='){
args['operateur']='IN';
}else if(args['operateur']=='!='){
args['operateur']='!IN';
}
}
if(args['modificateur']['fonction']==='total'){
if(Array.isArray(valeur_champ)){
valeur_champ=valeur_champ.length;
}else{
valeur_champ=0;
}
}
if(args['modificateur']['fonction']==='substr'){
if(args['modificateur']['arguments'][1]){
valeur_champ=valeur_champ.substr(args['modificateur']['arguments'][0],args['modificateur']['arguments'][1]);
}else{
valeur_champ=valeur_champ.substr(args['modificateur']['arguments'][0]);
}
}
if(args['operateur']=='IN'||args['operateur']=='!IN'){
valeur=valeur.split(',');
if(!Array.isArray(valeur_champ)){
if(valeur_champ){
valeur_champ=[valeur_champ];
}else{
valeur_champ=[];
}
}
}
if(['<','<=','>=','>'].includes(args['operateur'])){
valeur=Number(valeur);
valeur_champ=Number(valeur_champ);
}
switch(args['operateur']){
case'==':
return valeur_champ==valeur;
case'!=':
return valeur_champ!=valeur;
case'>':
return valeur_champ>valeur;
case'>=':
return valeur_champ>=valeur;
case'<':
return valeur_champ<valeur;
case'<=':
return valeur_champ<=valeur;
case'MATCH':
return RegExp(valeur,args.regexp_modif).test(valeur_champ);
case'!MATCH':
return!RegExp(valeur,args.regexp_modif).test(valeur_champ);
case'IN':
return $(valeur).filter(valeur_champ).length?true:false;
case'!IN':
return $(valeur).filter(valeur_champ).length?false:true;
default:
return valeur_champ?true:false;
}
}
function afficher_si_set_etapes_presentation_courante(form,name=''){
var etapes=afficher_si_parse_data_etapes_futures(form);
if(!etapes){
return;
}
form.find('[data-etapes_max]').each(function(){
var etape_total=$(this).attr('data-etapes_max');
for(etape in etapes){
var condition=etapes[etape]['afficher_si']??'true';
if(!name||condition.includes(name)){
$(this).attr('data-'+etape,eval(condition));
}
if(condition&&!eval($(this).attr('data-'+etape))){
etape_total--;
}
}
$(this).find('.formulaire_spip_etape__total').text(etape_total);
});
}
function afficher_si_set_etape_suivante(form,name){
var etapes=afficher_si_parse_data_etapes_futures(form);
if(!etapes){
return;
}
var label_enregistrer=form.find('button.submit_suivant').attr('data-label_enregistrer');
var titre_retenu=label_enregistrer;
for(etape in etapes){
var afficher_si_etape=etapes[etape]['afficher_si']??'true';
if(eval(afficher_si_etape)){
titre_retenu=etapes[etape]['label'];
break;
}
}
form.find('button.submit_suivant').each(function(){
var $span=$(this).find('.btn__label');
if(!$(this).attr('data-modele')){
$(this).attr('data-modele',$span.html());
}
if(titre_retenu==label_enregistrer){
$span.html(titre_retenu);
}else{
$span.html($(this).attr('data-modele'));
$span.find('.titre-etape').html(titre_retenu);
}
});
}
function afficher_si_init_chemin_etapes(form){
var etapes=afficher_si_parse_data_etapes_futures(form);
if(!etapes){
return;
}
for(etape in etapes){
var afficher_si_etape=etapes[etape]['afficher_si']??'';
if(afficher_si_etape){
form.find('.etapes__item.'+etape).attr('data-afficher_si',afficher_si_etape).addClass('afficher_si_sans_visuel');
}
}
}
function afficher_si_parse_data_etapes_futures(form){
var data=form.attr('data-resume_etapes_futures');
if(!data){
return;
}
var etapes=JSON.parse(data);
return etapes;
}
/* plugins/auto/slick/v2.1.0/lib/slick/slick.min.js */
!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(d){"use strict";var s,l=window.Slick||{};s=0,(l=function(i,e){var t,o=this;o.defaults={adaptiveHeight:!1,appendArrows:d(i),appendDots:d(i),arrows:!0,arrowsPlacement:null,asNavFor:null,prevArrow:'<button class="slick-prev" type="button"><span class="slick-prev-icon" aria-hidden="true"></span><span class="slick-sr-only">Previous</span></button>',nextArrow:'<button class="slick-next" type="button"><span class="slick-next-icon" aria-hidden="true"></span><span class="slick-sr-only">Next</span></button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return d('<button type="button"><span class="slick-dot-icon" aria-hidden="true"></span><span class="slick-sr-only">Go to slide '+(e+1)+"</span></button>")},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,infinite:!0,initialSlide:0,instructionsText:null,lazyLoad:"ondemand",mobileFirst:!1,playIcon:'<span class="slick-play-icon" aria-hidden="true"></span>',pauseIcon:'<span class="slick-pause-icon" aria-hidden="true"></span>',pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,regionLabel:"carousel",respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useAutoplayToggleButton:!0,useCSS:!0,useGroupRole:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},o.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,$instructionsText:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$pauseButton:null,$pauseIcon:null,$playIcon:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},d.extend(o,o.initials),o.activeBreakpoint=null,o.animType=null,o.animProp=null,o.breakpoints=[],o.breakpointSettings=[],o.cssTransitions=!1,o.focussed=!1,o.interrupted=!1,o.hidden="hidden",o.paused=!0,o.positionProp=null,o.respondTo=null,o.rowCount=1,o.shouldClick=!0,o.$slider=d(i),o.$slidesCache=null,o.transformType=null,o.transitionType=null,o.visibilityChange="visibilitychange",o.windowWidth=0,o.windowTimer=null,t=d(i).data("slick")||{},o.options=d.extend({},o.defaults,e,t),o.currentSlide=o.options.initialSlide,o.originalSettings=o.options,void 0!==document.mozHidden?(o.hidden="mozHidden",o.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(o.hidden="webkitHidden",o.visibilityChange="webkitvisibilitychange"),o.autoPlay=d.proxy(o.autoPlay,o),o.autoPlayClear=d.proxy(o.autoPlayClear,o),o.autoPlayIterator=d.proxy(o.autoPlayIterator,o),o.autoPlayToggleHandler=d.proxy(o.autoPlayToggleHandler,o),o.changeSlide=d.proxy(o.changeSlide,o),o.clickHandler=d.proxy(o.clickHandler,o),o.selectHandler=d.proxy(o.selectHandler,o),o.setPosition=d.proxy(o.setPosition,o),o.swipeHandler=d.proxy(o.swipeHandler,o),o.dragHandler=d.proxy(o.dragHandler,o),o.instanceUid=s++,o.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,o.registerBreakpoints(),o.init(!0)}).prototype.addSlide=l.prototype.slickAdd=function(i,e,t){var o=this;if("boolean"==typeof e)t=e,e=null;else if(e<0||e>=o.slideCount)return!1;o.unload(),"number"==typeof e?0===e&&0===o.$slides.length?d(i).appendTo(o.$slideTrack):t?d(i).insertBefore(o.$slides.eq(e)):d(i).insertAfter(o.$slides.eq(e)):!0===t?d(i).prependTo(o.$slideTrack):d(i).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each(function(i,e){d(e).attr("data-slick-index",i),d(e).attr("role","group"),d(e).attr("aria-label","slide "+i)}),o.$slidesCache=o.$slides,o.reinit()},l.prototype.animateHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.animate({height:i},e.options.speed))},l.prototype.animateSlide=function(i,e){var t={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(i=-i),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:i},o.options.speed,o.options.easing,e):o.$slideTrack.animate({top:i},o.options.speed,o.options.easing,e):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),d({animStart:o.currentLeft}).animate({animStart:i},{duration:o.options.speed,easing:o.options.easing,step:function(i){i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate("+i+"px, 0px)":t[o.animType]="translate(0px,"+i+"px)",o.$slideTrack.css(t)},complete:function(){e&&e.call()}})):(o.applyTransition(),i=Math.ceil(i),!1===o.options.vertical?t[o.animType]="translate3d("+i+"px, 0px, 0px)":t[o.animType]="translate3d(0px,"+i+"px, 0px)",o.$slideTrack.css(t),e&&setTimeout(function(){o.disableTransition(),e.call()},o.options.speed))},l.prototype.getNavTarget=function(){var i=this.options.asNavFor;return i&&null!==i&&(i=d(i).not(this.$slider)),i},l.prototype.asNavFor=function(e){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var i=d(this).slick("getSlick");i.unslicked||i.slideHandler(e,!0)})},l.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},l.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},l.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},l.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},l.prototype.autoPlayToggleHandler=function(){var i=this;i.paused?(i.$playIcon.css("display","none"),i.$pauseIcon.css("display","inline"),i.$pauseButton.find(".slick-play-text").attr("style","display: none"),i.$pauseButton.find(".slick-pause-text").removeAttr("style"),i.slickPlay()):(i.$playIcon.css("display","inline"),i.$pauseIcon.css("display","none"),i.$pauseButton.find(".slick-play-text").removeAttr("style"),i.$pauseButton.find(".slick-pause-text").attr("style","display: none"),i.slickPause())},l.prototype.buildArrows=function(){var i=this;if(!0===i.options.arrows)if(i.$prevArrow=d(i.options.prevArrow).addClass("slick-arrow"),i.$nextArrow=d(i.options.nextArrow).addClass("slick-arrow"),i.slideCount>i.options.slidesToShow){if(i.htmlExpr.test(i.options.prevArrow))if(null!=i.options.arrowsPlacement)switch(i.options.arrowsPlacement){case"beforeSlides":case"split":console.log("test"),i.$prevArrow.prependTo(i.options.appendArrows);break;case"afterSlides":i.$prevArrow.appendTo(i.options.appendArrows)}else i.$prevArrow.prependTo(i.options.appendArrows);if(i.htmlExpr.test(i.options.nextArrow))if(null!=i.options.arrowsPlacement)switch(i.options.arrowsPlacement){case"beforeSlides":console.log("test2"),i.$prevArrow.after(i.$nextArrow);break;case"afterSlides":case"split":i.$nextArrow.appendTo(i.options.appendArrows)}else i.$nextArrow.appendTo(i.options.appendArrows);!0!==i.options.infinite&&i.$prevArrow.addClass("slick-disabled").prop("disabled",!0)}else i.$prevArrow.add(i.$nextArrow).addClass("slick-hidden").prop("disabled",!0)},l.prototype.buildDots=function(){var i,e,t=this;if(!0===t.options.dots&&t.slideCount>t.options.slidesToShow){for(t.$slider.addClass("slick-dotted"),e=d("<ul />").addClass(t.options.dotsClass),i=0;i<=t.getDotCount();i+=1)e.append(d("<li />").append(t.options.customPaging.call(this,t,i)));t.$dots=e.appendTo(t.options.appendDots),t.$dots.find("li").first().addClass("slick-active")}},l.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(i,e){d(e).attr("data-slick-index",i).data("originalStyling",d(e).attr("style")||""),t.options.useGroupRole&&d(e).attr("role","group").attr("aria-label","slide "+(i+1))}),t.$slider.addClass("slick-slider"),t.$slider.attr("role","region"),t.$slider.attr("aria-label",t.options.regionLabel),t.$slideTrack=0===t.slideCount?d('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),!0!==t.options.centerMode&&!0!==t.options.swipeToSlide||(t.options.slidesToScroll=1),d("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable"),t.options.autoplay&&t.options.useAutoplayToggleButton&&(t.$pauseIcon=d(t.options.pauseIcon).attr("aria-hidden",!0),t.$playIcon=d(t.options.playIcon).attr("aria-hidden",!0),t.$pauseButton=d('<button type="button" class="slick-autoplay-toggle-button">'),t.$pauseButton.append(t.$pauseIcon),t.$pauseButton.append(t.$playIcon.css("display","none")),t.$pauseButton.append(d('<span class="slick-pause-text slick-sr-only">Pause</span>')),t.$pauseButton.append(d('<span class="slick-play-text slick-sr-only" style="display: none">Play</span>')),t.$pauseButton.prependTo(t.$slider)),null!=t.options.instructionsText&&""!=t.options.instructionsText&&(t.$instructionsText=d('<p class="slick-instructions slick-sr-only">'+t.options.instructionsText+"</p>"),t.$instructionsText.prependTo(t.$slider))},l.prototype.buildRows=function(){var i,e,t,o=this,s=document.createDocumentFragment(),n=o.$slider.children();if(0<o.options.rows){for(t=o.options.slidesPerRow*o.options.rows,e=Math.ceil(n.length/t),i=0;i<e;i++){for(var l=document.createElement("div"),r=0;r<o.options.rows;r++){for(var a=document.createElement("div"),d=0;d<o.options.slidesPerRow;d++){var p=i*t+(r*o.options.slidesPerRow+d);n.get(p)&&a.appendChild(n.get(p))}l.appendChild(a)}s.appendChild(l)}o.$slider.empty().append(s),o.$slider.children().children().children().css({width:100/o.options.slidesPerRow+"%",display:"inline-block"})}},l.prototype.checkResponsive=function(i,e){var t,o,s,n=this,l=!1,r=n.$slider.width(),a=window.innerWidth||d(window).width();if("window"===n.respondTo?s=a:"slider"===n.respondTo?s=r:"min"===n.respondTo&&(s=Math.min(a,r)),n.options.responsive&&n.options.responsive.length&&null!==n.options.responsive){for(t in o=null,n.breakpoints)n.breakpoints.hasOwnProperty(t)&&(!1===n.originalSettings.mobileFirst?s<n.breakpoints[t]&&(o=n.breakpoints[t]):s>n.breakpoints[t]&&(o=n.breakpoints[t]));null!==o?null!==n.activeBreakpoint&&o===n.activeBreakpoint&&!e||(n.activeBreakpoint=o,"unslick"===n.breakpointSettings[o]?n.unslick(o):(n.options=d.extend({},n.originalSettings,n.breakpointSettings[o]),!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i)),l=o):null!==n.activeBreakpoint&&(n.activeBreakpoint=null,n.options=n.originalSettings,!0===i&&(n.currentSlide=n.options.initialSlide),n.refresh(i),l=o),i||!1===l||n.$slider.trigger("breakpoint",[n,l])}},l.prototype.changeSlide=function(i,e){var t,o,s=this,n=d(i.currentTarget);switch(n.is("a")&&i.preventDefault(),n.is("li")||(n=n.closest("li")),t=s.slideCount%s.options.slidesToScroll!=0?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,i.data.message){case"previous":o=0==t?s.options.slidesToScroll:s.options.slidesToShow-t,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-o,!1,e);break;case"next":o=0==t?s.options.slidesToScroll:t,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+o,!1,e);break;case"index":var l=0===i.data.index?0:i.data.index||n.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(l),!1,e),n.children().trigger("focus");break;default:return}},l.prototype.checkNavigable=function(i){var e=this.getNavigableIndexes(),t=0;if(i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},l.prototype.cleanUpEvents=function(){var i=this;i.options.autoplay&&i.options.useAutoplayToggleButton&&i.$pauseButton.off("click.slick",i.autoPlayToggleHandler),i.options.dots&&null!==i.$dots&&d("li",i.$dots).off("click.slick",i.changeSlide).off("mouseenter.slick",d.proxy(i.interrupt,i,!0)).off("mouseleave.slick",d.proxy(i.interrupt,i,!1)),i.$slider.off("focus.slick blur.slick"),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow&&i.$prevArrow.off("click.slick",i.changeSlide),i.$nextArrow&&i.$nextArrow.off("click.slick",i.changeSlide)),i.$list.off("touchstart.slick mousedown.slick",i.swipeHandler),i.$list.off("touchmove.slick mousemove.slick",i.swipeHandler),i.$list.off("touchend.slick mouseup.slick",i.swipeHandler),i.$list.off("touchcancel.slick mouseleave.slick",i.swipeHandler),i.$list.off("click.slick",i.clickHandler),d(document).off(i.visibilityChange,i.visibility),i.cleanUpSlideEvents(),d(window).off("orientationchange.slick.slick-"+i.instanceUid,i.orientationChange),d(window).off("resize.slick.slick-"+i.instanceUid,i.resize),d("[draggable!=true]",i.$slideTrack).off("dragstart",i.preventDefault),d(window).off("load.slick.slick-"+i.instanceUid,i.setPosition)},l.prototype.cleanUpSlideEvents=function(){var i=this;i.$list.off("mouseenter.slick",d.proxy(i.interrupt,i,!0)),i.$list.off("mouseleave.slick",d.proxy(i.interrupt,i,!1))},l.prototype.cleanUpRows=function(){var i;0<this.options.rows&&((i=this.$slides.children().children()).removeAttr("style"),this.$slider.empty().append(i))},l.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},l.prototype.destroy=function(i){var e=this;e.autoPlayClear(),e.touchObject={},e.cleanUpEvents(),d(".slick-cloned",e.$slider).detach(),e.options.autoplay&&e.options.useAutoplayToggleButton&&e.$pauseButton.remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.$prevArrow.length&&(e.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").prop("disabled",!1).css("display",""),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove()),e.$nextArrow&&e.$nextArrow.length&&(e.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").prop("disabled",!1).css("display",""),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove()),e.$slides&&(e.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){d(this).attr("style",d(this).data("originalStyling"))}),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.detach(),e.$list.detach(),e.$slider.append(e.$slides)),e.cleanUpRows(),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$slider.removeClass("slick-dotted"),e.unslicked=!0,i||e.$slider.trigger("destroy",[e])},l.prototype.disableTransition=function(i){var e={};e[this.transitionType]="",!1===this.options.fade?this.$slideTrack.css(e):this.$slides.eq(i).css(e)},l.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},l.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},l.prototype.filterSlides=l.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},l.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick","*",function(i){var e=d(this);setTimeout(function(){t.options.pauseOnFocus&&e.is(":focus")&&(t.focussed=!0,t.autoPlay())},0)}).on("blur.slick","*",function(i){d(this);t.options.pauseOnFocus&&(t.focussed=!1,t.autoPlay())})},l.prototype.getCurrent=l.prototype.slickCurrentSlide=function(){return this.currentSlide},l.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},l.prototype.getLeft=function(i){var e,t,o,s,n=this,l=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),l=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(l=i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,l=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(l=n.slideOffset=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+l,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},l.prototype.getOption=l.prototype.slickGetOption=function(i){return this.options[i]},l.prototype.getNavigableIndexes=function(){for(var i=this,e=0,t=0,o=[],s=!1===i.options.infinite?i.slideCount:(e=-1*i.options.slidesToScroll,t=-1*i.options.slidesToScroll,2*i.slideCount);e<s;)o.push(e),e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;return o},l.prototype.getSlick=function(){return this},l.prototype.getSlideCount=function(){var s,n=this,i=!0===n.options.centerMode?Math.floor(n.$list.width()/2):0,l=-1*n.swipeLeft+i;return!0===n.options.swipeToSlide?(n.$slideTrack.find(".slick-slide").each(function(i,e){var t=d(e).outerWidth(),o=e.offsetLeft;if(!0!==n.options.centerMode&&(o+=t/2),l<o+t)return s=e,!1}),Math.abs(d(s).attr("data-slick-index")-n.currentSlide)||1):n.options.slidesToScroll},l.prototype.goTo=l.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},l.prototype.init=function(i){var e=this;d(e.$slider).hasClass("slick-initialized")||(d(e.$slider).addClass("slick-initialized"),e.buildRows(),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.updateArrows(),e.updateDots(),e.checkResponsive(!0),e.focusHandler()),i&&e.$slider.trigger("init",[e]),e.options.autoplay&&(e.paused=!1,e.autoPlay()),e.updateSlideVisibility(),null!=e.options.accessibility&&console.warn("accessibility setting is no longer supported."),null!=e.options.focusOnChange&&console.warn("focusOnChange is no longer supported."),null!=e.options.focusOnSelect&&console.warn("focusOnSelect is no longer supported.")},l.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide))},l.prototype.initDotEvents=function(){var i=this;!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&d("li",i.$dots).on("click.slick",{message:"index"},i.changeSlide),!0===i.options.dots&&!0===i.options.pauseOnDotsHover&&i.slideCount>i.options.slidesToShow&&d("li",i.$dots).on("mouseenter.slick",d.proxy(i.interrupt,i,!0)).on("mouseleave.slick",d.proxy(i.interrupt,i,!1))},l.prototype.initSlideEvents=function(){var i=this;i.options.pauseOnHover&&(i.$list.on("mouseenter.slick",d.proxy(i.interrupt,i,!0)),i.$list.on("mouseleave.slick",d.proxy(i.interrupt,i,!1)))},l.prototype.initializeEvents=function(){var i=this;i.initArrowEvents(),i.initDotEvents(),i.initSlideEvents(),i.options.autoplay&&i.options.useAutoplayToggleButton&&i.$pauseButton.on("click.slick",i.autoPlayToggleHandler),i.$list.on("touchstart.slick mousedown.slick",{action:"start"},i.swipeHandler),i.$list.on("touchmove.slick mousemove.slick",{action:"move"},i.swipeHandler),i.$list.on("touchend.slick mouseup.slick",{action:"end"},i.swipeHandler),i.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},i.swipeHandler),i.$list.on("click.slick",i.clickHandler),d(document).on(i.visibilityChange,d.proxy(i.visibility,i)),d(window).on("orientationchange.slick.slick-"+i.instanceUid,d.proxy(i.orientationChange,i)),d(window).on("resize.slick.slick-"+i.instanceUid,d.proxy(i.resize,i)),d("[draggable!=true]",i.$slideTrack).on("dragstart",i.preventDefault),d(window).on("load.slick.slick-"+i.instanceUid,i.setPosition),d(i.setPosition)},l.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},l.prototype.lazyLoad=function(){var i,e,t,n=this;function o(i){d("img[data-lazy]",i).each(function(){var i=d(this),e=d(this).attr("data-lazy"),t=d(this).attr("data-srcset"),o=d(this).attr("data-sizes")||n.$slider.attr("data-sizes"),s=document.createElement("img");s.onload=function(){i.animate({opacity:0},100,function(){t&&(i.attr("srcset",t),o&&i.attr("sizes",o)),i.attr("src",e).animate({opacity:1},200,function(){i.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,i,e])})},s.onerror=function(){i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,i,e])},s.src=e})}if(!0===n.options.centerMode?t=!0===n.options.infinite?(e=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(e=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),n.options.slidesToShow/2+1+2+n.currentSlide):(e=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,t=Math.ceil(e+n.options.slidesToShow),!0===n.options.fade&&(0<e&&e--,t<=n.slideCount&&t++)),i=n.$slider.find(".slick-slide").slice(e,t),"anticipated"===n.options.lazyLoad)for(var s=e-1,l=t,r=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)s<0&&(s=n.slideCount-1),i=(i=i.add(r.eq(s))).add(r.eq(l)),s--,l++;o(i),n.slideCount<=n.options.slidesToShow?o(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?o(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&o(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},l.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},l.prototype.next=l.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},l.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},l.prototype.pause=l.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},l.prototype.play=l.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},l.prototype.postSlide=function(i){var e=this;e.unslicked||(e.$slider.trigger("afterChange",[e,i]),e.animating=!1,e.slideCount>e.options.slidesToShow&&e.setPosition(),e.swipeLeft=null,e.options.autoplay&&e.autoPlay(),e.updateSlideVisibility())},l.prototype.prev=l.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},l.prototype.preventDefault=function(i){i.preventDefault()},l.prototype.progressiveLazyLoad=function(i){i=i||1;var e,t,o,s,n,l=this,r=d("img[data-lazy]",l.$slider);r.length?(e=r.first(),t=e.attr("data-lazy"),o=e.attr("data-srcset"),s=e.attr("data-sizes")||l.$slider.attr("data-sizes"),(n=document.createElement("img")).onload=function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,e,t]),l.progressiveLazyLoad()},n.onerror=function(){i<3?setTimeout(function(){l.progressiveLazyLoad(i+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,e,t]),l.progressiveLazyLoad())},n.src=t):l.$slider.trigger("allImagesLoaded",[l])},l.prototype.refresh=function(i){var e,t=this,o=t.slideCount-t.options.slidesToShow;!t.options.infinite&&t.currentSlide>o&&(t.currentSlide=o),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),e=t.currentSlide,t.destroy(!0),d.extend(t,t.initials,{currentSlide:e}),t.init(),i||t.changeSlide({data:{message:"index",index:e}},!1)},l.prototype.registerBreakpoints=function(){var i,e,t,o=this,s=o.options.responsive||null;if("array"===d.type(s)&&s.length){for(i in o.respondTo=o.options.respondTo||"window",s)if(t=o.breakpoints.length-1,s.hasOwnProperty(i)){for(e=s[i].breakpoint;0<=t;)o.breakpoints[t]&&o.breakpoints[t]===e&&o.breakpoints.splice(t,1),t--;o.breakpoints.push(e),o.breakpointSettings[e]=s[i].settings}o.breakpoints.sort(function(i,e){return o.options.mobileFirst?i-e:e-i})}},l.prototype.reinit=function(){var i=this;i.$slides=i.$slideTrack.children(i.options.slide).addClass("slick-slide"),i.slideCount=i.$slides.length,i.currentSlide>=i.slideCount&&0!==i.currentSlide&&(i.currentSlide=i.currentSlide-i.options.slidesToScroll),i.slideCount<=i.options.slidesToShow&&(i.currentSlide=0),i.registerBreakpoints(),i.setProps(),i.setupInfinite(),i.buildArrows(),i.updateArrows(),i.initArrowEvents(),i.buildDots(),i.updateDots(),i.initDotEvents(),i.cleanUpSlideEvents(),i.initSlideEvents(),i.checkResponsive(!1,!0),i.setSlideClasses("number"==typeof i.currentSlide?i.currentSlide:0),i.setPosition(),i.focusHandler(),i.paused=!i.options.autoplay,i.autoPlay(),i.$slider.trigger("reInit",[i])},l.prototype.resize=function(){var i=this;d(window).width()!==i.windowWidth&&(clearTimeout(i.windowDelay),i.windowDelay=window.setTimeout(function(){i.windowWidth=d(window).width(),i.checkResponsive(),i.unslicked||i.setPosition()},50))},l.prototype.removeSlide=l.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},l.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled||(!(s={})===o.cssTransitions?s[o.animType]="translate("+e+", "+t+")":s[o.animType]="translate3d("+e+", "+t+", 0px)"),o.$slideTrack.css(s)},l.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},l.prototype.setFade=function(){var t,o=this;o.$slides.each(function(i,e){t=o.slideWidth*i*-1,!0===o.options.rtl?d(e).css({position:"relative",right:t,top:0,zIndex:o.options.zIndex-2,opacity:0}):d(e).css({position:"relative",left:t,top:0,zIndex:o.options.zIndex-2,opacity:0})}),o.$slides.eq(o.currentSlide).css({zIndex:o.options.zIndex-1,opacity:1})},l.prototype.setHeight=function(){var i,e=this;1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical&&(i=e.$slides.eq(e.currentSlide).outerHeight(!0),e.$list.css("height",i))},l.prototype.setOption=l.prototype.slickSetOption=function(){var i,e,t,o,s,n=this,l=!1;if("object"===d.type(arguments[0])?(t=arguments[0],l=arguments[1],s="multiple"):"string"===d.type(arguments[0])&&(o=arguments[1],l=arguments[2],"responsive"===(t=arguments[0])&&"array"===d.type(arguments[1])?s="responsive":void 0!==arguments[1]&&(s="single")),"single"===s)n.options[t]=o;else if("multiple"===s)d.each(t,function(i,e){n.options[i]=e});else if("responsive"===s)for(e in o)if("array"!==d.type(n.options.responsive))n.options.responsive=[o[e]];else{for(i=n.options.responsive.length-1;0<=i;)n.options.responsive[i].breakpoint===o[e].breakpoint&&n.options.responsive.splice(i,1),i--;n.options.responsive.push(o[e])}l&&(n.unload(),n.reinit())},l.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},l.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},l.prototype.setSlideClasses=function(i){var e,t,o,s,n=this,l=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true").attr("aria-label",function(){return d(this).attr("aria-label").replace(" (centered)","")});n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode?(o=n.options.slidesToShow%2==0?1:0,s=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(s<=i&&i<=n.slideCount-1-s?n.$slides.slice(i-s+o,i+s+1).addClass("slick-active").removeAttr("aria-hidden"):(e=n.options.slidesToShow+i,l.slice(e-s+1+o,e+s+2).addClass("slick-active").removeAttr("aria-hidden")),0===i?l.eq(n.options.slidesToShow+n.slideCount+1).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"}):i===n.slideCount-1&&l.eq(n.options.slidesToShow).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"})),n.$slides.eq(i).addClass("slick-center").attr("aria-label",function(){return d(this).attr("aria-label")+" (centered)"})):0<=i&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").removeAttr("aria-hidden"):l.length<=n.options.slidesToShow?l.addClass("slick-active").removeAttr("aria-hidden"):(t=n.slideCount%n.options.slidesToShow,e=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?l.slice(e-(n.options.slidesToShow-t),e+t).addClass("slick-active").removeAttr("aria-hidden"):l.slice(e,e+n.options.slidesToShow).addClass("slick-active").removeAttr("aria-hidden")),"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},l.prototype.setupInfinite=function(){var i,e,t,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(e=null,o.slideCount>o.options.slidesToShow)){for(t=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,i=o.slideCount;i>o.slideCount-t;--i)e=i-1,d(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(i=0;i<t+o.slideCount;i+=1)e=i,d(o.$slides[e]).clone(!0).attr("id","").attr("data-slick-index",e+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each(function(){d(this).attr("id","")})}},l.prototype.interrupt=function(i){i||this.autoPlay(),this.interrupted=i},l.prototype.selectHandler=function(i){var e=d(i.target).is(".slick-slide")?d(i.target):d(i.target).parents(".slick-slide"),t=(t=parseInt(e.attr("data-slick-index")))||0;this.slideCount<=this.options.slidesToShow?this.slideHandler(t,!1,!0):this.slideHandler(t)},l.prototype.slideHandler=function(i,e,t){var o,s,n,l,r,a,d=this;if(e=e||!1,!(!0===d.animating&&!0===d.options.waitForAnimate||!0===d.options.fade&&d.currentSlide===i))if(!1===e&&d.asNavFor(i),o=i,r=d.getLeft(o),l=d.getLeft(d.currentSlide),d.currentLeft=null===d.swipeLeft?l:d.swipeLeft,!1===d.options.infinite&&!1===d.options.centerMode&&(i<0||i>d.getDotCount()*d.options.slidesToScroll))!1===d.options.fade&&(o=d.currentSlide,!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(l,function(){d.postSlide(o)}):d.postSlide(o));else if(!1===d.options.infinite&&!0===d.options.centerMode&&(i<0||i>d.slideCount-d.options.slidesToScroll))!1===d.options.fade&&(o=d.currentSlide,!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(l,function(){d.postSlide(o)}):d.postSlide(o));else{if(d.options.autoplay&&clearInterval(d.autoPlayTimer),s=o<0?d.slideCount%d.options.slidesToScroll!=0?d.slideCount-d.slideCount%d.options.slidesToScroll:d.slideCount+o:o>=d.slideCount?d.slideCount%d.options.slidesToScroll!=0?0:o-d.slideCount:o,d.animating=!0,d.$slider.trigger("beforeChange",[d,d.currentSlide,s]),n=d.currentSlide,d.currentSlide=s,d.setSlideClasses(d.currentSlide),d.options.asNavFor&&(a=(a=d.getNavTarget()).slick("getSlick")).slideCount<=a.options.slidesToShow&&a.setSlideClasses(d.currentSlide),d.updateDots(),d.updateArrows(),!0===d.options.fade)return!0!==t?(d.fadeSlideOut(n),d.fadeSlide(s,function(){d.postSlide(s)})):d.postSlide(s),void d.animateHeight();!0!==t&&d.slideCount>d.options.slidesToShow?d.animateSlide(r,function(){d.postSlide(s)}):d.postSlide(s)}},l.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},l.prototype.swipeDirection=function(){var i=this,e=i.touchObject.startX-i.touchObject.curX,t=i.touchObject.startY-i.touchObject.curY,o=Math.atan2(t,e),s=Math.round(180*o/Math.PI);return s<0&&(s=360-Math.abs(s)),s<=45&&0<=s||s<=360&&315<=s?!1===i.options.rtl?"left":"right":135<=s&&s<=225?!1===i.options.rtl?"right":"left":!0===i.options.verticalSwiping?35<=s&&s<=135?"down":"up":"vertical"},l.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1;if(o.interrupted=!1,o.shouldClick=!(10<o.touchObject.swipeLength),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},l.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},l.prototype.swipeMove=function(i){var e,t,o,s,n,l=this,r=void 0!==i.originalEvent?i.originalEvent.touches:null;return!(!l.dragging||l.scrolling||r&&1!==r.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==r?r[0].pageX:i.clientX,l.touchObject.curY=void 0!==r?r[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),n=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&4<n?!(l.scrolling=!0):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=n),t=l.swipeDirection(),void 0!==i.originalEvent&&4<l.touchObject.swipeLength&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,(l.touchObject.edgeHit=!1)===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},l.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return!(t.touchObject={});void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},l.prototype.unfilterSlides=l.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},l.prototype.unload=function(){var i=this;d(".slick-cloned",i.$slider).remove(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove(),i.$nextArrow&&i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove(),i.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},l.prototype.unslick=function(i){this.$slider.trigger("unslick",[this,i]),this.destroy()},l.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2);!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").prop("disabled",!1),i.$nextArrow.removeClass("slick-disabled").prop("disabled",!1),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").prop("disabled",!0),i.$nextArrow.removeClass("slick-disabled").prop("disabled",!1)):(i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode||i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode)&&(i.$nextArrow.addClass("slick-disabled").prop("disabled",!0),i.$prevArrow.removeClass("slick-disabled").prop("disabled",!1)))},l.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").find("button").removeAttr("aria-current").end().end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active").find("button").attr("aria-current",!0).end().end())},l.prototype.updateSlideVisibility=function(){this.$slideTrack.find(".slick-slide").attr("aria-hidden","true").find("a, input, button, select").attr("tabindex","-1"),this.$slideTrack.find(".slick-active").removeAttr("aria-hidden").find("a, input, button, select").removeAttr("tabindex")},l.prototype.visibility=function(){this.options.autoplay&&(document[this.hidden]?this.interrupted=!0:this.interrupted=!1)},d.fn.slick=function(){for(var i,e=this,t=arguments[0],o=Array.prototype.slice.call(arguments,1),s=e.length,n=0;n<s;n++)if("object"==typeof t||void 0===t?e[n].slick=new l(e[n],t):i=e[n].slick[t].apply(e[n].slick,o),void 0!==i)return i;return e}});
/* local/cache-js/jsdyn-javascript_slick_spip_js-8b33efde.js?1756489818 */
$(function(){
$("#slick").slick(
{"slide":"div","slidesToShow":1,"slidesToScroll":1,"autoplay":false,"fade":false,"speed":300,"vertical":false,"lazyload":"ondemand","centerMode":false,"cssEase":"ease","dots":false,"pauseOnHover":true,"pauseOnDotsHover":false,"rtl":false,"adaptiveHeight":false,"arrows":false}
);
});