%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/lib/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/lib/rangy-inputs-min.js

(function(C){var L="undefined";var D,G,Q,F,B;var N,I,M,P;function J(S,U){var T=typeof S[U];return T==="function"||(!!(T=="object"&&S[U]))||T=="unknown"}function K(S,T){return typeof (S[T])!=L}function E(S,T){return !!(typeof (S[T])=="object"&&S[T])}function H(S){if(window.console&&window.console.log){window.console.log("TextInputs module for Rangy not supported in your browser. Reason: "+S)}}function O(T,U,S){if(U<0){U+=T.value.length}if(typeof S==L){S=U}if(S<0){S+=T.value.length}return{start:U,end:S}}function A(T,U,S){return{start:U,end:S,length:S-U,text:T.value.slice(U,S)}}function R(){return E(document,"body")?document.body:document.getElementsByTagName("body")[0]}C(document).ready(function(){var T=document.createElement("textarea");R().appendChild(T);if(K(T,"selectionStart")&&K(T,"selectionEnd")){D=function(W){var X=W.selectionStart,V=W.selectionEnd;return A(W,X,V)};G=function(X,V,W){var Y=O(X,V,W);X.selectionStart=Y.start;X.selectionEnd=Y.end};P=function(W,V){if(V){W.selectionEnd=W.selectionStart}else{W.selectionStart=W.selectionEnd}}}else{if(J(T,"createTextRange")&&E(document,"selection")&&J(document.selection,"createRange")){D=function(Z){var c=0,X=0,b,W,V,a;var Y=document.selection.createRange();if(Y&&Y.parentElement()==Z){b=Z.value.replace(/\r\n/g,"\n");V=b.length;W=Z.createTextRange();W.moveToBookmark(Y.getBookmark());a=Z.createTextRange();a.collapse(false);if(W.compareEndPoints("StartToEnd",a)>-1){c=X=V}else{c=-W.moveStart("character",-V);c+=b.slice(0,c).split("\n").length-1;if(W.compareEndPoints("EndToEnd",a)>-1){X=V}else{X=-W.moveEnd("character",-V);X+=b.slice(0,X).split("\n").length-1}}}return A(Z,c,X)};var U=function(V,W){return W-(V.value.slice(0,W).split("\r\n").length-1)};G=function(Z,V,Y){var a=O(Z,V,Y);var X=Z.createTextRange();var W=U(Z,a.start);X.collapse(true);if(a.start==a.end){X.move("character",W)}else{X.moveEnd("character",U(Z,a.end));X.moveStart("character",W)}X.select()};P=function(X,W){var V=document.selection.createRange();V.collapse(W);V.select()}}else{R().removeChild(T);H("No means of finding text input caret position");return }}R().removeChild(T);F=function(W,Z,V,X){var Y;if(Z!=V){Y=W.value;W.value=Y.slice(0,Z)+Y.slice(V)}if(X){G(W,Z,Z)}};Q=function(V){var W=D(V);F(V,W.start,W.end,true)};M=function(V){var W=D(V),X;if(W.start!=W.end){X=V.value;V.value=X.slice(0,W.start)+X.slice(W.end)}G(V,W.start,W.start);return W.text};B=function(W,Z,V,X){var Y=W.value,a;W.value=Y.slice(0,V)+Z+Y.slice(V);if(X){a=V+Z.length;G(W,a,a)}};N=function(V,Y){var W=D(V),X=V.value;V.value=X.slice(0,W.start)+Y+X.slice(W.end);var Z=W.start+Y.length;G(V,Z,Z)};I=function(V,Y,b){var X=D(V),a=V.value;V.value=a.slice(0,X.start)+Y+X.text+b+a.slice(X.end);var Z=X.start+Y.length;var W=Z+X.length;G(V,Z,W)};function S(V,W){return function(){var Z=this.jquery?this[0]:this;var a=Z.nodeName.toLowerCase();if(Z.nodeType==1&&(a=="textarea"||(a=="input"&&Z.type=="text"))){var Y=[Z].concat(Array.prototype.slice.call(arguments));var X=V.apply(this,Y);if(!W){return X}}if(W){return this}}}C.fn.extend({getSelection:S(D,false),setSelection:S(G,true),collapseSelection:S(P,true),deleteSelectedText:S(Q,true),deleteText:S(F,true),extractSelectedText:S(M,false),insertText:S(B,true),replaceSelectedText:S(N,true),surroundSelectedText:S(I,true)})})})(jQuery);

Zerion Mini Shell 1.0