Sort an Option String Background

In C, there is a function to help parse command-line arguments: getopt.

Getopt takes the argument count (argc), the argument list (argv), and a string representing the options the program should take (optstring).

The option string (optstring) is a series of option characters each followed by one colon (for an option requiring an argument), two colons (for an option with an optional argument), or zero colons (for an option without an argument).

For example: one might use the following option string for their company's new widget.

"v::x:hy:S:G::dns:f::"


But that looks horrible! The options are all mixed together! This option string would look much better if it were sorted:

"f::G::v::S:s:x:y:dhn"


Specifications


The input will be a string matching the regular expression ([A-Za-z]:{0,2})+
You should take input as a string or list of characters.
You should output the string sorted by the method detailed below.
You do not need to handle empty input.
You do not need to handle input with repeated options of the same type ("aa" is not valid, but "aa:a::" is valid).


Sorting Method

In the sorted option string:


The characters followed by two colons come first, sorted alphabetically, with uppercase letters before their respective lowercase letters (i.e. "aBb", not "Bab").
Then are the characters with one colon, sorted alphabetically, with uppercase letters before their respective lowercase letters.
Last are the characters with no colon, sorted alphabetically, with uppercase letters before their respective lowercase letters.


Rules


Standard Loopholes are forbidden.


Scoring

This is code-golf, so shortest answer in bytes in each language wins.

Examples

# "input" =&gt; "output"
"v::x:hy:S:G::dns:f::" =&gt; "f::G::v::S:s:x:y:dhn"
"aa:a::" =&gt; "a::a:a"
"B:" =&gt; "B:"
"Confusio:n::" =&gt; "n::o:Cfinosu"
"Confusio:n:" =&gt; "n:o:Cfinosu"
"m:qW:X:xc:vViI" =&gt; "c:m:W:X:IiqVvx"
"V:omo:V" =&gt; "o:V:moV"
"agg:ra:va::ting::" =&gt; "a::g::a:g:aginrtv"
"input" =&gt; "inptu"


Long test case (312 characters)

Invaid Inputs (you don't have to handle):

"gg" (duplicated option)
"" (empty string)
":w:" (first colon isn't after a character)
"x:y:0:fhn" ('0' is not alphabetic)
"A:::" (3 colons is invalid)
Husk, 11 bytes

ΣÖom_↔Oġλ¬√


Try it online!

Explanation

ΣÖom_↔Oġλ¬√  Implicit input, say "kH::r:R:Hk:"
       ġ     Split between characters for which this gives a falsy result:
        λ      Take two arguments, ignore the first.
          √    Is the second argument a letter?
         ¬     Negate.
             Now we have the options: ["k","H::","r:","R:","H","k:"]
      O      Sort: ["H","H::","R:","k","k:","r:"]
 Ö           Sort by
     ↔       reversing and
  om_        converting everything to lowercase: ["H::","k:","R:","r:","H","k"]
Σ            Concatenate: H::k:R:r:Hk