diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js --- a/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js Tue Sep 27 16:37:53 2022 +0200 @@ -1,1 +1,1 @@ -!function(we){var Se=Math.abs,ze=Math.max,ke=Math.min,Ce=Math.round;function Ae(){return we("
")}we.imgAreaSelect=function(o,n){var t,i,r,c,d,a,s,u,l,h,f,m,e,p,y,g,v,b,x,w,S,z,k,C,A,W,I,K,P=we(o),N=Ae(),H=Ae(),M=Ae().add(Ae()).add(Ae()).add(Ae()),E=Ae().add(Ae()).add(Ae()).add(Ae()),O=we([]),T={left:0,top:0},L={left:0,top:0},j=0,D="absolute",R={x1:0,y1:0,x2:0,y2:0,width:0,height:0},X=document.documentElement,Y=navigator.userAgent;function $(e){return e+T.left-L.left}function q(e){return e+T.top-L.top}function B(e){return e-T.left+L.left}function Q(e){return e-T.top+L.top}function F(e){return ze(e.pageX||0,J(e).x)-L.left}function G(e){return ze(e.pageY||0,J(e).y)-L.top}function J(e){e=e.originalEvent||{};return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:0,y:0}}function U(e){var t=e||h,e=e||f;return{x1:Ce(R.x1*t),y1:Ce(R.y1*e),x2:Ce(R.x2*t),y2:Ce(R.y2*e),width:Ce(R.x2*t)-Ce(R.x1*t),height:Ce(R.y2*e)-Ce(R.y1*e)}}function V(e,t,o,i,s){var n=s||h,s=s||f;(R={x1:Ce(e/n||0),y1:Ce(t/s||0),x2:Ce(o/n||0),y2:Ce(i/s||0)}).width=R.x2-R.x1,R.height=R.y2-R.y1}function Z(){t&&P.width()&&(T={left:Ce(P.offset().left),top:Ce(P.offset().top)},d=P.innerWidth(),a=P.innerHeight(),T.top+=P.outerHeight()-a>>1,T.left+=P.outerWidth()-d>>1,e=Ce(n.minWidth/h)||0,p=Ce(n.minHeight/f)||0,y=Ce(ke(n.maxWidth/h||1<<24,d)),g=Ce(ke(n.maxHeight/f||1<<24,a)),"1.3.2"!=we().jquery||"fixed"!=D||X.getBoundingClientRect||(T.top+=ze(document.body.scrollTop,X.scrollTop),T.left+=ze(document.body.scrollLeft,X.scrollLeft)),L=/absolute|relative/.test(s.css("position"))?{left:Ce(s.offset().left)-s.scrollLeft(),top:Ce(s.offset().top)-s.scrollTop()}:"fixed"==D?{left:we(document).scrollLeft(),top:we(document).scrollTop()}:{left:0,top:0},r=$(0),c=q(0),(R.x2>d||R.y2>a)&&re())}function _(e){if(b){switch(N.css({left:$(R.x1),top:q(R.y1)}).add(H).width(W=R.width).height(I=R.height),H.add(M).add(O).css({left:0,top:0}),M.width(ze(W-M.outerWidth()+M.innerWidth(),0)).height(ze(I-M.outerHeight()+M.innerHeight(),0)),we(E[0]).css({left:r,top:c,width:R.x1,height:a}),we(E[1]).css({left:r+R.x1,top:c,width:W,height:R.y1}),we(E[2]).css({left:r+R.x2,top:c,width:d-R.x2,height:a}),we(E[3]).css({left:r+R.x1,top:c+R.y2,width:W,height:a-R.y2}),W-=O.outerWidth(),I-=O.outerHeight(),O.length){case 8:we(O[4]).css({left:W>>1}),we(O[5]).css({left:W,top:I>>1}),we(O[6]).css({left:W>>1,top:I}),we(O[7]).css({top:I>>1});case 4:O.slice(1,3).css({left:W}),O.slice(2,4).css({top:I})}!1!==e&&(we.imgAreaSelect.onKeyPress!=pe&&we(document).off(we.imgAreaSelect.keyPress,we.imgAreaSelect.onKeyPress),n.keys&&we(document).on(we.imgAreaSelect.keyPress,function(){we.imgAreaSelect.onKeyPress=pe})),ve&&M.outerWidth()-M.innerWidth()==2&&(M.css("margin",0),setTimeout(function(){M.css("margin","auto")},0))}}function ee(e){Z(),_(e),x=$(R.x1),w=q(R.y1),S=$(R.x2),z=q(R.y2)}function te(e,t){n.fadeSpeed?e.fadeOut(n.fadeSpeed,t):e.hide()}function oe(e){var t=B(F(e))-R.x1,e=Q(G(e))-R.y1;K||(Z(),K=!0,N.one("mouseout",function(){K=!1})),m="",n.resizable&&(e<=n.resizeMargin?m="n":e>=R.height-n.resizeMargin&&(m="s"),t<=n.resizeMargin?m+="w":t>=R.width-n.resizeMargin&&(m+="e")),N.css("cursor",m?m+"-resize":n.movable?"move":""),i&&i.toggle()}function ie(e){we("body").css("cursor",""),!n.autoHide&&R.width*R.height!=0||te(N.add(E),function(){we(this).hide()}),we(document).off("mousemove touchmove",ce),N.on("mousemove touchmove",oe),n.onSelectEnd(o,U())}function se(e){return"mousedown"==e.type&&1!=e.which||(oe(e),Z(),m?(we("body").css("cursor",m+"-resize"),x=$(R[/w/.test(m)?"x2":"x1"]),w=q(R[/n/.test(m)?"y2":"y1"]),we(document).on("mousemove touchmove",ce).one("mouseup touchend",ie),N.off("mousemove touchmove",oe)):n.movable?(u=r+R.x1-F(e),l=c+R.y1-G(e),N.off("mousemove touchmove",oe),we(document).on("mousemove touchmove",ae).one("mouseup touchend",function(){n.onSelectEnd(o,U()),we(document).off("mousemove touchmove",ae),N.on("mousemove touchmove",oe)})):P.mousedown(e)),!1}function ne(e){v&&(e?(S=ze(r,ke(r+d,x+Se(z-w)*v*(xy&&(S=x-y*(Sg&&(z=w-g*(z")}we.imgAreaSelect=function(o,n){var T,L,r,c,d,a,t,j,D,R,X,i,Y,$,q,B,s,Q,u,l,h,f,F,m,p,y,g,G,v=we(o),b=Ae(),x=Ae(),w=Ae().add(Ae()).add(Ae()).add(Ae()),S=Ae().add(Ae()).add(Ae()).add(Ae()),z=we([]),k={left:0,top:0},C={left:0,top:0},A=0,J="absolute",W={x1:0,y1:0,x2:0,y2:0,width:0,height:0},U=document.documentElement,V=navigator.userAgent;function I(e){return e+k.left-C.left}function K(e){return e+k.top-C.top}function P(e){return e-k.left+C.left}function N(e){return e-k.top+C.top}function Z(e){return ze(e.pageX||0,ee(e).x)-C.left}function _(e){return ze(e.pageY||0,ee(e).y)-C.top}function ee(e){e=e.originalEvent||{};return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:{x:0,y:0}}function H(e){var t=e||R,e=e||X;return{x1:Ce(W.x1*t),y1:Ce(W.y1*e),x2:Ce(W.x2*t),y2:Ce(W.y2*e),width:Ce(W.x2*t)-Ce(W.x1*t),height:Ce(W.y2*e)-Ce(W.y1*e)}}function te(e,t,o,i,s){var n=s||R,s=s||X;(W={x1:Ce(e/n||0),y1:Ce(t/s||0),x2:Ce(o/n||0),y2:Ce(i/s||0)}).width=W.x2-W.x1,W.height=W.y2-W.y1}function M(){T&&v.width()&&(k={left:Ce(v.offset().left),top:Ce(v.offset().top)},d=v.innerWidth(),a=v.innerHeight(),k.top+=v.outerHeight()-a>>1,k.left+=v.outerWidth()-d>>1,Y=Ce(n.minWidth/R)||0,$=Ce(n.minHeight/X)||0,q=Ce(ke(n.maxWidth/R||1<<24,d)),B=Ce(ke(n.maxHeight/X||1<<24,a)),"1.3.2"!=we().jquery||"fixed"!=J||U.getBoundingClientRect||(k.top+=ze(document.body.scrollTop,U.scrollTop),k.left+=ze(document.body.scrollLeft,U.scrollLeft)),C=/absolute|relative/.test(t.css("position"))?{left:Ce(t.offset().left)-t.scrollLeft(),top:Ce(t.offset().top)-t.scrollTop()}:"fixed"==J?{left:we(document).scrollLeft(),top:we(document).scrollTop()}:{left:0,top:0},r=I(0),c=K(0),(W.x2>d||W.y2>a)&&de())}function oe(e){if(Q){switch(b.css({left:I(W.x1),top:K(W.y1)}).add(x).width(y=W.width).height(g=W.height),x.add(w).add(z).css({left:0,top:0}),w.width(ze(y-w.outerWidth()+w.innerWidth(),0)).height(ze(g-w.outerHeight()+w.innerHeight(),0)),we(S[0]).css({left:r,top:c,width:W.x1,height:a}),we(S[1]).css({left:r+W.x1,top:c,width:y,height:W.y1}),we(S[2]).css({left:r+W.x2,top:c,width:d-W.x2,height:a}),we(S[3]).css({left:r+W.x1,top:c+W.y2,width:y,height:a-W.y2}),y-=z.outerWidth(),g-=z.outerHeight(),z.length){case 8:we(z[4]).css({left:y>>1}),we(z[5]).css({left:y,top:g>>1}),we(z[6]).css({left:y>>1,top:g}),we(z[7]).css({top:g>>1});case 4:z.slice(1,3).css({left:y}),z.slice(2,4).css({top:g})}!1!==e&&(we.imgAreaSelect.onKeyPress!=ge&&we(document).off(we.imgAreaSelect.keyPress,we.imgAreaSelect.onKeyPress),n.keys&&we(document).on(we.imgAreaSelect.keyPress,function(){we.imgAreaSelect.onKeyPress=ge})),O&&w.outerWidth()-w.innerWidth()==2&&(w.css("margin",0),setTimeout(function(){w.css("margin","auto")},0))}}function ie(e){M(),oe(e),u=I(W.x1),l=K(W.y1),h=I(W.x2),f=K(W.y2)}function se(e,t){n.fadeSpeed?e.fadeOut(n.fadeSpeed,t):e.hide()}function E(e){var t=P(Z(e))-W.x1,e=N(_(e))-W.y1;G||(M(),G=!0,b.one("mouseout",function(){G=!1})),i="",n.resizable&&(e<=n.resizeMargin?i="n":e>=W.height-n.resizeMargin&&(i="s"),t<=n.resizeMargin?i+="w":t>=W.width-n.resizeMargin&&(i+="e")),b.css("cursor",i?i+"-resize":n.movable?"move":""),L&&L.toggle()}function ne(e){we("body").css("cursor",""),!n.autoHide&&W.width*W.height!=0||se(b.add(S),function(){we(this).hide()}),we(document).off("mousemove touchmove",ae),b.on("mousemove touchmove",E),n.onSelectEnd(o,H())}function re(e){return"mousedown"==e.type&&1!=e.which||(E(e),M(),i?(we("body").css("cursor",i+"-resize"),u=I(W[/w/.test(i)?"x2":"x1"]),l=K(W[/n/.test(i)?"y2":"y1"]),we(document).on("mousemove touchmove",ae).one("mouseup touchend",ne),b.off("mousemove touchmove",E)):n.movable?(j=r+W.x1-Z(e),D=c+W.y1-_(e),b.off("mousemove touchmove",E),we(document).on("mousemove touchmove",le).one("mouseup touchend",function(){n.onSelectEnd(o,H()),we(document).off("mousemove touchmove",le),b.on("mousemove touchmove",E)})):v.mousedown(e)),!1}function ce(e){s&&(e?(h=ze(r,ke(r+d,u+Se(f-l)*s*(uq&&(h=u-q*(hB&&(f=l-B*(f