import {p,o,G,H as H$1,O,P,E as E$1,u,F,q as q$1,r,t,s}from'../chunk-JT2PPQ6V.mjs';import {a}from'../chunk-2FEDFNW7.mjs';import'../chunk-YQKSXMBN.mjs';import {h}from'../chunk-WGY6QKPW.mjs';import'../chunk-GLKEY6D3.mjs';import {b}from'../chunk-IOXRZECH.mjs';var $=(o,n,t)=>a(...q$1(o,n,t)),A=(o,n,t)=>{let[r,e,m]=p(o,n,t);return [h(r),h(e),h(m)]},S=(o$1,n,t,r)=>{o(o$1,n,t,r),o$1[0]=h(o$1[0]),o$1[1]=h(o$1[1]),o$1[2]=h(o$1[2]);},E=(o,n,t)=>A(...G(o,n,t)),q=(o,n,t,r)=>{H$1(o,n,t,r),S(o,o[0],o[1],o[2]);},I=Math.PI/180,R=(o,n,t)=>A(...O(o,n,t)),v=(o,n,t,r)=>{P(o,n,t,r),S(o,o[0],o[1],o[2]);},z=(o,n,t)=>{let r=t*I;return R(o,n*Math.cos(r),n*Math.sin(r))},H=(o,n,t,r)=>{let e=r*I;v(o,n,t*Math.cos(e),t*Math.sin(e));},J=o=>E$1(o,u),M=(o,n,t$1)=>{o.toGamutProphoto=r=>{let e=F(r,u,$);if(e===null)return new o(r);let[m,p,a]=e.linear,[k,F$1,G]=q$1(m,p,a);return o._makeFromLinearSrgb(k,F$1,G,e.alpha)},o.prototype.toProphoto=function(r$1=4){let{r:e,g:m,b:p,alpha:a}=r(this._rawRgb());return {r:b(e,r$1),g:b(m,r$1),b:b(p,r$1),alpha:a,colorSpace:"prophoto-rgb"}},o.prototype.toProphotoString=function(r=4){let{r:e,g:m,b:p,alpha:a}=this.toProphoto(r);return a<1?`color(prophoto-rgb ${e} ${m} ${p} / ${a})`:`color(prophoto-rgb ${e} ${m} ${p})`},n.push(t,s),t$1.push([t,"prophoto-rgb"],[s,"prophoto-rgb"]);},K=M;export{K as default,J as inGamutProphoto,R as labToProphotoChannels,v as labToProphotoChannelsInto,z as lchToProphotoChannels,H as lchToProphotoChannelsInto,A as linearToProphotoChannels,S as linearToProphotoChannelsInto,E as oklchToProphotoChannels,q as oklchToProphotoChannelsInto};//# sourceMappingURL=prophoto.mjs.map
//# sourceMappingURL=prophoto.mjs.map