/** @license React v0.17.0 * scheduler-tracing.profiling.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */'use strict';Object.defineProperty(exports,"__esModule",{value:!0});varg=0,l=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.__interactionsRef={current:newSet};exports.__subscriberRef={current:null};varm=null;m=newSet;functionn(e){vard=!1,a=null;m.forEach(function(c){try{c.onInteractionTraced(e)}catch(b){d||(d=!0,a=b)}});if(d)throwa;}functionp(e){vard=!1,a=null;m.forEach(function(c){try{c.onInteractionScheduledWorkCompleted(e)}catch(b){d||(d=!0,a=b)}});if(d)throwa;}functionq(e,d){vara=!1,c=null;m.forEach(function(b){try{b.onWorkScheduled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throwc;}functionr(e,d){vara=!1,c=null;m.forEach(function(b){try{b.onWorkStarted(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throwc;}functiont(e,d){vara=!1,c=null;m.forEach(function(b){try{b.onWorkStopped(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throwc;}functionu(e,d){vara=!1,c=null;m.forEach(function(b){try{b.onWorkCanceled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throwc;}exports.unstable_clear=function(e){vard=exports.__interactionsRef.current;exports.__interactionsRef.current=newSet;try{returne()}finally{exports.__interactionsRef.current=d}};exports.unstable_getCurrent=function(){returnexports.__interactionsRef.current};exports.unstable_getThreadID=function(){return++l};exports.unstable_trace=function(e,d,a){varc=3<arguments.length&&void0!==arguments[3]?arguments[3]:0,b={__count:1,id:g++,name:e,timestamp:d},f=exports.__interactionsRef.current,k=newSet(f);k.add(b);exports.__interactionsRef.current=k;varh=exports.__subscriberRef.current;try{if(null!==h)h.onInteractionTraced(b)}finally{try{if(null!==h)h.onWorkStarted(k,c)}finally{try{varv=a()}finally{exports.__interactionsRef.current=f;try{if(null!==h)h.onWorkStopped(k,c)}finally{if(b.__count--,null!==h&&0===b.__count)h.onInteractionScheduledWorkCompleted(b)}}}}returnv};exports.unstable_wrap=function(e){functiond(){vard=exports.__interactionsRef.current;exports.__interactionsRef.current=c;b=exports.__subscriberRef.current;try{try{if(null!==b)b.onWorkStarted(c,a)}finally{try{varh=e.apply(void0,arguments)}finally{if(exports.__interactionsRef.current=d,null!==b)b.onWorkStopped(c,a)}}returnh}finally{f||(f=!0,c.forEach(function(a){a.__count--;if(null!==b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)}))}}vara=1<arguments.length&&void0!==arguments[1]?arguments[1]:0,c=exports.__interactionsRef.current,b=exports.__subscriberRef.current;if(null!==b)b.onWorkScheduled(c,a);c.forEach(function(a){a.__count++});varf=!1;d.cancel=function(){b=exports.__subscriberRef.current;try{if(null!==b)b.onWorkCanceled(c,a)}finally{c.forEach(function(a){a.__count--;if(b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)})}};returnd};exports.unstable_subscribe=function(e){m.add(e);1===m.size&&(exports.__subscriberRef.current={onInteractionScheduledWorkCompleted:p,onInteractionTraced:n,onWorkCanceled:u,onWorkScheduled:q,onWorkStarted:r,onWorkStopped:t})};exports.unstable_unsubscribe=function(e){m.delete(e);0===m.size&&(exports.__subscriberRef.current=null)};