Whenever a juvenile is detained or placed in an alternative to detention infringing upon the child's liberty interest under section 43-250 or 43-253, the juvenile shall be released unconditionally within forty-eight hours after the detention or placement order or the setting of bond, excluding nonjudicial days, unless within such period of time (1) a motion has been filed alleging that such juvenile has violated an order of the juvenile court, (2) a juvenile court petition has been filed pursuant to section 43-274, or (3) a criminal complaint has been filed in a court of competent jurisdiction.