jq_ui-8.x-1.8/jquery_ui/assets/vendor/jquery.ui/ui/vendor/jquery-color/jquery.color-min.js

jquery_ui/assets/vendor/jquery.ui/ui/vendor/jquery-color/jquery.color-min.js
/*!
 * jQuery Color Animations v3.0.0
 * https://github.com/jquery/jquery-color
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license.
 * https://jquery.org/license
 *
 * Date: Wed May 15 16:49:44 2024 +0200
 */
!function(r,n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof exports?module.exports=n(require("jquery")):n(r.jQuery)}(this,(function(r,n){"use strict";var t,e={},o=e.toString,a=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(r){return[r[1],r[2],r[3],r[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(r){return[2.55*r[1],2.55*r[2],2.55*r[3],r[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(r){return[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16),r[4]?(parseInt(r[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(r){return[parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16),r[4]?(parseInt(r[4]+r[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(r){return[r[1],r[2]/100,r[3]/100,r[4]]}}],s=r.Color=function(n,t,e,o){return new r.Color.fn.parse(n,t,e,o)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},f=r.each;function c(r){return null==r?r+"":"object"==typeof r?e[o.call(r)]||"object":typeof r}function p(r,n,t){var e=l[n.type]||{};return null==r?t||!n.def?null:n.def:(r=e.floor?~~r:parseFloat(r),e.mod?(r+e.mod)%e.mod:Math.min(e.max,Math.max(0,r)))}function d(n){var e=s(),o=e._rgba=[];return n=n.toLowerCase(),f(i,(function(r,t){var a,i=t.re.exec(n),s=i&&t.parse(i),l=t.space||"rgba";if(s)return a=e[l](s),e[u[l].cache]=a[u[l].cache],o=e._rgba=a._rgba,!1})),o.length?("0,0,0,0"===o.join()&&r.extend(o,t.transparent),e):t[n]}function h(r,n,t){return 6*(t=(t+1)%1)<1?r+(n-r)*t*6:2*t<1?n:3*t<2?r+(n-r)*(2/3-t)*6:r}f(u,(function(r,n){n.cache="_"+r,n.props.alpha={idx:3,type:"percent",def:1}})),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(r,n){e["[object "+n+"]"]=n.toLowerCase()})),s.fn=r.extend(s.prototype,{parse:function(e,o,a,i){if(e===n)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=r(e).css(o),o=n);var l=this,h=c(e),b=this._rgba=[];return o!==n&&(e=[e,o,a,i],h="array"),"string"===h?this.parse(d(e)||t._default):"array"===h?(f(u.rgba.props,(function(r,n){b[n.idx]=p(e[n.idx],n)})),this):"object"===h?(f(u,e instanceof s?function(r,n){e[n.cache]&&(l[n.cache]=e[n.cache].slice())}:function(n,t){var o=t.cache;f(t.props,(function(r,n){if(!l[o]&&t.to){if("alpha"===r||null==e[r])return;l[o]=t.to(l._rgba)}l[o][n.idx]=p(e[r],n,!0)})),l[o]&&r.inArray(null,l[o].slice(0,3))<0&&(null==l[o][3]&&(l[o][3]=1),t.from&&(l._rgba=t.from(l[o])))}),this):void 0},is:function(r){var n=s(r),t=!0,e=this;return f(u,(function(r,o){var a,i=n[o.cache];return i&&(a=e[o.cache]||o.to&&o.to(e._rgba)||[],f(o.props,(function(r,n){if(null!=i[n.idx])return t=i[n.idx]===a[n.idx]}))),t})),t},_space:function(){var r=[],n=this;return f(u,(function(t,e){n[e.cache]&&r.push(t)})),r.pop()},transition:function(r,n){var t=s(r),e=t._space(),o=u[e],a=0===this.alpha()?s("transparent"):this,i=a[o.cache]||o.to(a._rgba),c=i.slice();return t=t[o.cache],f(o.props,(function(r,e){var o=e.idx,a=i[o],s=t[o],u=l[e.type]||{};null!==s&&(null===a?c[o]=s:(u.mod&&(s-a>u.mod/2?a+=u.mod:a-s>u.mod/2&&(a-=u.mod)),c[o]=p((s-a)*n+a,e)))})),this[e](c)},blend:function(n){if(1===this._rgba[3])return this;var t=this._rgba.slice(),e=t.pop(),o=s(n)._rgba;return s(r.map(t,(function(r,n){return(1-e)*o[n]+e*r})))},toRgbaString:function(){var n="rgba(",t=r.map(this._rgba,(function(r,n){return null!=r?r:n>2?1:0}));return 1===t[3]&&(t.pop(),n="rgb("),n+t.join(", ")+")"},toHslaString:function(){var n="hsla(",t=r.map(this.hsla(),(function(r,n){return null==r&&(r=n>2?1:0),n&&n<3&&(r=Math.round(100*r)+"%"),r}));return 1===t[3]&&(t.pop(),n="hsl("),n+t.join(", ")+")"},toHexString:function(n){var t=this._rgba.slice(),e=t.pop();return n&&t.push(~~(255*e)),"#"+r.map(t,(function(r){return("0"+(r||0).toString(16)).substr(-2)})).join("")},toString:function(){return this.toRgbaString()}}),s.fn.parse.prototype=s.fn,u.hsla.to=function(r){if(null==r[0]||null==r[1]||null==r[2])return[null,null,null,r[3]];var n,t,e=r[0]/255,o=r[1]/255,a=r[2]/255,i=r[3],s=Math.max(e,o,a),u=Math.min(e,o,a),l=s-u,f=s+u,c=.5*f;return n=u===s?0:e===s?60*(o-a)/l+360:o===s?60*(a-e)/l+120:60*(e-o)/l+240,t=0===l?0:c<=.5?l/f:l/(2-f),[Math.round(n)%360,t,c,null==i?1:i]},u.hsla.from=function(r){if(null==r[0]||null==r[1]||null==r[2])return[null,null,null,r[3]];var n=r[0]/360,t=r[1],e=r[2],o=r[3],a=e<=.5?e*(1+t):e+t-e*t,i=2*e-a;return[Math.round(255*h(i,a,n+1/3)),Math.round(255*h(i,a,n)),Math.round(255*h(i,a,n-1/3)),o]},f(u,(function(r,t){var e=t.props,o=t.cache,i=t.to,u=t.from;s.fn[r]=function(r){if(i&&!this[o]&&(this[o]=i(this._rgba)),r===n)return this[o].slice();var t,a=c(r),l="array"===a||"object"===a?r:arguments,d=this[o].slice();return f(e,(function(r,n){var t=l["object"===a?r:n.idx];null==t&&(t=d[n.idx]),d[n.idx]=p(t,n)})),u?((t=s(u(d)))[o]=d,t):s(d)},f(e,(function(n,t){s.fn[n]||(s.fn[n]=function(e){var o,i,s,u,l=c(e);return i=(o=this[u="alpha"===n?this._hsla?"hsla":"rgba":r]())[t.idx],"undefined"===l?i:("function"===l&&(l=c(e=e.call(this,i))),null==e&&t.empty?this:("string"===l&&(s=a.exec(e))&&(e=i+parseFloat(s[2])*("+"===s[1]?1:-1)),o[t.idx]=e,this[u](o)))})}))})),s.hook=function(n){var t=n.split(" ");f(t,(function(n,t){r.cssHooks[t]={set:function(r,n){var e;"transparent"===n||"string"===c(n)&&!(e=d(n))||(n=(n=s(e||n)).toRgbaString()),r.style[t]=n}},r.fx.step[t]=function(n){n.colorInit||(n.start=s(n.elem,t),n.end=s(n.end),n.colorInit=!0),r.cssHooks[t].set(n.elem,n.start.transition(n.end,n.pos))}}))},s.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),r.cssHooks.borderColor={expand:function(r){var n={};return f(["Top","Right","Bottom","Left"],(function(t,e){n["border"+e+"Color"]=r})),n}},t=r.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}));
//# sourceMappingURL=jquery.color-min.js.map

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc