src/pyams_skin/resources/js/ext/tinymce/dev/classes/dom/DomQuery.min.js
changeset 81 472bd9195a15
equal deleted inserted replaced
80:181b3a0ee15a 81:472bd9195a15
       
     1 define("tinymce/dom/DomQuery",["tinymce/dom/EventUtils","tinymce/dom/Sizzle","tinymce/util/Tools","tinymce/Env"],function(l,i,f,g){var H=document,n=Array.prototype.push,w=Array.prototype.slice;var t=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;var G=l.Event,h;function c(I){return typeof I!=="undefined"}function q(I){return typeof I==="string"}function B(I){return I&&I==I.window}function v(K,J){var M,L,I;J=J||H;I=J.createElement("div");M=J.createDocumentFragment();I.innerHTML=K;while((L=I.firstChild)){M.appendChild(L)}return M}function s(I,L,M,J){var K;if(q(L)){L=v(L,r(I[0]))}else{if(L.length&&!L.nodeType){L=j.makeArray(L);if(J){for(K=L.length-1;K>=0;K--){s(I,L[K],M,J)}}else{for(K=0;K<L.length;K++){s(I,L[K],M,J)}}return I}}if(L.nodeType){K=I.length;while(K--){M.call(I[K],L)}}return I}function d(J,I){return J&&I&&(" "+J.className+" ").indexOf(" "+I+" ")!==-1}function p(L,M,J){var I,K;M=j(M)[0];L.each(function(){var N=this;if(!J||I!=N.parentNode){I=N.parentNode;K=M.cloneNode(false);N.parentNode.insertBefore(K,N);K.appendChild(N)}else{K.appendChild(N)}});return L}var b=f.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," ");var y=f.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," ");var C={"for":"htmlFor","class":"className",readonly:"readOnly"};var e={"float":"cssFloat"};var E={},F={};function j(I,J){return new j.fn.init(I,J)}function z(J,K){var I;if(K.indexOf){return K.indexOf(J)}I=K.length;while(I--){if(K[I]===J){return I}}return -1}var D=/^\s*|\s*$/g;function x(I){return(I===null||I===h)?"":(""+I).replace(D,"")}function k(N,O){var L,J,I,K,M;if(N){L=N.length;if(L===K){for(J in N){if(N.hasOwnProperty(J)){M=N[J];if(O.call(M,J,M)===false){break}}}}else{for(I=0;I<L;I++){M=N[I];if(O.call(M,I,M)===false){break}}}}return N}function o(K,J){var I=[];k(K,function(L,M){if(J(M,L)){I.push(M)}});return I}function r(I){if(!I){return H}if(I.nodeType==9){return I}return I.ownerDocument}j.fn=j.prototype={constructor:j,selector:"",context:null,length:0,init:function(I,L){var J=this,K,M;if(!I){return J}if(I.nodeType){J.context=J[0]=I;J.length=1;return J}if(L&&L.nodeType){J.context=L}else{if(L){return j(I).attr(L)}else{J.context=L=document}}if(q(I)){J.selector=I;if(I.charAt(0)==="<"&&I.charAt(I.length-1)===">"&&I.length>=3){K=[null,I,null]}else{K=t.exec(I)}if(K){if(K[1]){M=v(I,r(L)).firstChild;while(M){n.call(J,M);M=M.nextSibling}}else{M=r(L).getElementById(K[2]);if(!M){return J}if(M.id!==K[2]){return J.find(I)}J.length=1;J[0]=M}}else{return j(L).find(I)}}else{this.add(I,false)}return J},toArray:function(){return f.toArray(this)},add:function(K,M){var J=this,I,L;if(q(K)){return J.add(j(K))}if(M!==false){I=j.unique(J.toArray().concat(j.makeArray(K)));J.length=I.length;for(L=0;L<I.length;L++){J[L]=I[L]}}else{n.apply(J,j.makeArray(K))}return J},attr:function(J,L){var I=this,K;if(typeof J==="object"){k(J,function(M,N){I.attr(M,N)})}else{if(c(L)){this.each(function(){var M;if(this.nodeType===1){M=E[J];if(M&&M.set){M.set(this,L);return}if(L===null){this.removeAttribute(J,2)}else{this.setAttribute(J,L,2)}}})}else{if(I[0]&&I[0].nodeType===1){K=E[J];if(K&&K.get){return K.get(I[0],J)}if(y[J]){return I.prop(J)?J:h}L=I[0].getAttribute(J,2);if(L===null){L=h}}return L}}return I},removeAttr:function(I){return this.attr(I,null)},prop:function(J,K){var I=this;J=C[J]||J;if(typeof J==="object"){k(J,function(L,M){I.prop(L,M)})}else{if(c(K)){this.each(function(){if(this.nodeType==1){this[J]=K}})}else{if(I[0]&&I[0].nodeType&&J in I[0]){return I[0][J]}return K}}return I},css:function(K,O){var J=this,P,N;function M(Q){return Q.replace(/-(\D)/g,function(S,R){return R.toUpperCase()})}function I(Q){return Q.replace(/[A-Z]/g,function(R){return"-"+R})}if(typeof K==="object"){k(K,function(Q,R){J.css(Q,R)})}else{if(c(O)){K=M(K);if(typeof O==="number"&&!b[K]){O+="px"}J.each(function(){var R=this.style;N=F[K];if(N&&N.set){N.set(this,O);return}try{this.style[e[K]||K]=O}catch(Q){}if(O===null||O===""){if(R.removeProperty){R.removeProperty(I(K))}else{R.removeAttribute(K)}}})}else{P=J[0];N=F[K];if(N&&N.get){return N.get(P)}if(P.ownerDocument.defaultView){try{return P.ownerDocument.defaultView.getComputedStyle(P,null).getPropertyValue(I(K))}catch(L){return h}}else{if(P.currentStyle){return P.currentStyle[M(K)]}}}}return J},remove:function(){var I=this,K,J=this.length;while(J--){K=I[J];G.clean(K);if(K.parentNode){K.parentNode.removeChild(K)}}return this},empty:function(){var I=this,K,J=this.length;while(J--){K=I[J];while(K.firstChild){K.removeChild(K.firstChild)}}return this},html:function(L){var I=this,K;if(c(L)){K=I.length;try{while(K--){I[K].innerHTML=L}}catch(J){j(I[K]).empty().append(L)}return I}return I[0]?I[0].innerHTML:""},text:function(K){var I=this,J;if(c(K)){J=I.length;while(J--){if("innerText" in I[J]){I[J].innerText=K}else{I[0].textContent=K}}return I}return I[0]?(I[0].innerText||I[0].textContent):""},append:function(){return s(this,arguments,function(I){if(this.nodeType===1){this.appendChild(I)}})},prepend:function(){return s(this,arguments,function(I){if(this.nodeType===1){this.insertBefore(I,this.firstChild)}},true)},before:function(){var I=this;if(I[0]&&I[0].parentNode){return s(I,arguments,function(J){this.parentNode.insertBefore(J,this)})}return I},after:function(){var I=this;if(I[0]&&I[0].parentNode){return s(I,arguments,function(J){this.parentNode.insertBefore(J,this.nextSibling)},true)}return I},appendTo:function(I){j(I).append(this);return this},prependTo:function(I){j(I).prepend(this);return this},replaceWith:function(I){return this.before(I).remove()},wrap:function(I){return p(this,I)},wrapAll:function(I){return p(this,I,true)},wrapInner:function(I){this.each(function(){j(this).contents().wrapAll(I)});return this},unwrap:function(){return this.parent().each(function(){j(this).replaceWith(this.childNodes)})},clone:function(){var I=[];this.each(function(){I.push(this.cloneNode(true))});return j(I)},addClass:function(I){return this.toggleClass(I,true)},removeClass:function(I){return this.toggleClass(I,false)},toggleClass:function(J,K){var I=this;if(typeof J!="string"){return I}if(J.indexOf(" ")!==-1){k(J.split(" "),function(){I.toggleClass(this,K)})}else{I.each(function(L,N){var M,O;O=d(N,J);if(O!==K){M=N.className;if(O){N.className=x((" "+M+" ").replace(" "+J+" "," "))}else{N.className+=M?" "+J:J}}})}return I},hasClass:function(I){return d(this[0],I)},each:function(I){return k(this,I)},on:function(I,J){return this.each(function(){G.bind(this,I,J)})},off:function(I,J){return this.each(function(){G.unbind(this,I,J)})},trigger:function(I){return this.each(function(){if(typeof I=="object"){G.fire(this,I.type,I)}else{G.fire(this,I)}})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new j(w.apply(this,arguments))},eq:function(I){return I===-1?this.slice(I):this.slice(I,+I+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(I){var L,J,K=[];for(L=0,J=this.length;L<J;L++){j.find(I,this[L],K)}return j(K)},filter:function(I){if(typeof I=="function"){return j(o(this.toArray(),function(K,J){return I(J,K)}))}return j(j.filter(I,this.toArray()))},closest:function(J){var I=[];if(J instanceof j){J=J[0]}this.each(function(K,L){while(L){if(typeof J=="string"&&j(L).is(J)){I.push(L);break}else{if(L==J){I.push(L);break}}L=L.parentNode}});return j(I)},offset:function(L){var O,K,J;var I=0,N=0,M;if(!L){O=this[0];if(O){K=O.ownerDocument;J=K.documentElement;if(O.getBoundingClientRect){M=O.getBoundingClientRect();I=M.left+(J.scrollLeft||K.body.scrollLeft)-J.clientLeft;N=M.top+(J.scrollTop||K.body.scrollTop)-J.clientTop}}return{left:I,top:N}}return this.css(L)},push:n,sort:[].sort,splice:[].splice};f.extend(j,{extend:f.extend,makeArray:function(I){if(B(I)||I.nodeType){return[I]}return f.toArray(I)},inArray:z,isArray:f.isArray,each:k,trim:x,grep:o,find:i,expr:i.selectors,unique:i.uniqueSort,text:i.getText,contains:i.contains,filter:function(L,I,K){var J=I.length;if(K){L=":not("+L+")"}while(J--){if(I[J].nodeType!=1){I.splice(J,1)}}if(I.length===1){I=j.find.matchesSelector(I[0],L)?[I[0]]:[]}else{I=j.find.matches(L,I)}return I}});function u(J,M,L){var I=[],K=J[M];if(typeof L!="string"&&L instanceof j){L=L[0]}while(K&&K.nodeType!==9){if(L!==undefined){if(K===L){break}if(typeof L=="string"&&j(K).is(L)){break}}if(K.nodeType===1){I.push(K)}K=K[M]}return I}function A(L,K,J,M){var I=[];if(M instanceof j){M=M[0]}for(;L;L=L[K]){if(J&&L.nodeType!==J){continue}if(M!==undefined){if(L===M){break}if(typeof M=="string"&&j(L).is(M)){break}}I.push(L)}return I}function a(K,J,I){for(K=K[J];K;K=K[J]){if(K.nodeType==I){return K}}return null}k({parent:function(J){var I=J.parentNode;return I&&I.nodeType!==11?I:null},parents:function(I){return u(I,"parentNode")},next:function(I){return a(I,"nextSibling",1)},prev:function(I){return a(I,"previousSibling",1)},children:function(I){return A(I.firstChild,"nextSibling",1)},contents:function(I){return f.toArray((I.nodeName==="iframe"?I.contentDocument||I.contentWindow.document:I).childNodes)}},function(I,J){j.fn[I]=function(L){var M=this,K=[];M.each(function(){var N=J.call(K,this,L,K);if(N){if(j.isArray(N)){K.push.apply(K,N)}else{K.push(N)}}});if(this.length>1){K=j.unique(K);if(I.indexOf("parents")===0){K=K.reverse()}}K=j(K);if(L){return K.filter(L)}return K}});k({parentsUntil:function(I,J){return u(I,"parentNode",J)},nextUntil:function(I,J){return A(I,"nextSibling",1,J).slice(1)},prevUntil:function(I,J){return A(I,"previousSibling",1,J).slice(1)}},function(I,J){j.fn[I]=function(L,N){var M=this,K=[];M.each(function(){var O=J.call(K,this,L,K);if(O){if(j.isArray(O)){K.push.apply(K,O)}else{K.push(O)}}});if(this.length>1){K=j.unique(K);if(I.indexOf("parents")===0||I==="prevUntil"){K=K.reverse()}}K=j(K);if(N){return K.filter(N)}return K}});j.fn.is=function(I){return !!I&&this.filter(I).length>0};j.fn.init.prototype=j.fn;j.overrideDefaults=function(K){var J;function I(L,M){J=J||K();if(arguments.length===0){L=J.element}if(!M){M=J.context}return new I.fn.init(L,M)}j.extend(I,this);return I};function m(K,J,I){k(I,function(L,M){K[L]=K[L]||{};K[L][J]=M})}if(g.ie&&g.ie<8){m(E,"get",{maxlength:function(J){var I=J.maxLength;if(I===2147483647){return h}return I},size:function(J){var I=J.size;if(I===20){return h}return I},"class":function(I){return I.className},style:function(J){var I=J.style.cssText;if(I.length===0){return h}return I}});m(E,"set",{"class":function(J,I){J.className=I},style:function(J,I){J.style.cssText=I}})}if(g.ie&&g.ie<9){e["float"]="styleFloat";m(F,"set",{opacity:function(K,J){var I=K.style;if(J===null||J===""){I.removeAttribute("filter")}else{I.zoom=1;I.filter="alpha(opacity="+(J*100)+")"}}})}j.attrHooks=E;j.cssHooks=F;return j});